Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

nix update #2892

Merged
merged 42 commits into from May 13, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
42 commits
Select commit Hold shift + click to select a range
0141210
Drop -haddock as ghc 8.10.7 fails to build ghc-lib with:
pepeiborra Apr 29, 2022
ca400df
flake.lock: Update
smunix Apr 25, 2022
42f2304
nix flake update & bump ghc921 -> ghc922
smunix Apr 25, 2022
bb89cc6
myst-parser: bump docutils version requirements
smunix Apr 25, 2022
8bef492
fix devShells and packages default
smunix Apr 26, 2022
a58f97d
use ghc-exactprint 1.5.0 for ghc922
smunix Apr 30, 2022
35f2989
ghc902: add flag hlint34 to nix
smunix Apr 30, 2022
5ba3cc4
macosx: add SSE-enabled ptr-poker dependency
smunix Apr 30, 2022
abaadd7
ghc902 requires ghc-lib-parser >= 9.2
smunix Apr 30, 2022
a93d548
nix: ghcDefault supports HLS tweaks
smunix Apr 30, 2022
90f65cb
fix typo
smunix Apr 30, 2022
9b8f200
add support for pre-commit in mkDevShell
smunix Apr 30, 2022
ac3ed9b
fix typo
smunix Apr 30, 2022
1674c88
add ptr-poker to nix shell
smunix Apr 30, 2022
fe77cc6
add ghc-884 configuration tweaks
smunix Apr 30, 2022
2e2bdc8
fix stylish-haskell for ghc-884
smunix Apr 30, 2022
0801b0c
fix default ghc lookup
smunix Apr 30, 2022
67745f9
ghc884: fixup brittany version to 0.13.1.2
smunix Apr 30, 2022
7f725e0
ghc884: fixup aeson version to 1.5.2.0
smunix Apr 30, 2022
72717b2
ghc884: fixup ormolu/fourmolu
smunix Apr 30, 2022
b26ca70
add configuration tweak for ghc8107
smunix Apr 30, 2022
f72ddb8
rename configuration-ghc-xxx.nix files
smunix Apr 30, 2022
e639e62
update hackage index
smunix Apr 30, 2022
7116967
use current cabal/hackage to fetch ptr-poker in mkDevShell
smunix Apr 30, 2022
bf7c5fe
reinstate .pre-commit.yaml
smunix May 1, 2022
e81b50b
nix: temporary disable "build binaries" from the work flow
smunix May 1, 2022
7ffa9ed
nix: temporary disable builds and partially populate cachix
smunix May 2, 2022
cbeb2e9
nix: temporarily disable ghc 884 and 8107
smunix May 2, 2022
39fa0eb
nix: temporarily disable nix develop run
smunix May 2, 2022
3b29588
nix: re-enable ghc8107/ghc884 builds, disable "build all binaries"
smunix May 3, 2022
e507922
nix: noop push commit to test cachix
smunix May 3, 2022
0818140
nix: touch flake.nix, remove ghc 884
smunix May 3, 2022
8783487
nix: rm ghc 810, ghc88 + disableLibraryProfiling
smunix May 7, 2022
349a877
nix: build all binaries again
smunix May 7, 2022
afe7068
Update flake.nix
smunix May 8, 2022
76d7692
Update flake.nix
smunix May 8, 2022
9a1bdd1
Update flake.nix
smunix May 8, 2022
c8d13e3
revert change made on comment
smunix May 8, 2022
bc72be4
rm myst-parser.nix
smunix May 8, 2022
cff1918
fix typo (thanks @guibou)
smunix May 12, 2022
45194c9
explain why we disable library profiling with nix
smunix May 12, 2022
3bcb951
ghc922, disable "hls-hlint-plugin"
smunix May 12, 2022
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
2 changes: 1 addition & 1 deletion .gitignore
Expand Up @@ -31,7 +31,7 @@ test/testdata/**/hie.yaml
.shake/

# pre-commit-hook.nix
#.pre-commit-config.yaml
.pre-commit-config.yaml

# direnv
/.direnv/
Expand Down
2 changes: 1 addition & 1 deletion cabal.project
Expand Up @@ -43,7 +43,7 @@ package *

write-ghc-environment-files: never

index-state: 2022-04-27T09:22:49Z
Copy link
Contributor

@smunix smunix May 8, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pulls the latest revision of ptr-poker from hackage

index-state: 2022-04-30T21:02:45Z

constraints:
hyphenation +embed,
Expand Down
45 changes: 45 additions & 0 deletions configuration-ghc-90.nix
@@ -0,0 +1,45 @@
{ pkgs, inputs }:

let
disabledPlugins = [ "hls-brittany-plugin" "hls-stylish-haskell-plugin" ];

hpkgsOverride = hself: hsuper:
with pkgs.haskell.lib;
{
hlsDisabledPlugins = disabledPlugins;
# YOLO
mkDerivation = args:
hsuper.mkDerivation (args // {
jailbreak = true;
doCheck = false;
});
} // (builtins.mapAttrs (_: drv: disableLibraryProfiling drv) {
# ptr-poker breaks on MacOS without SSE2 optimizations
# https://github.com/nikita-volkov/ptr-poker/issues/11
ptr-poker = hself.callCabal2nix "ptr-poker" inputs.ptr-poker { };

ghc-lib = hself.ghc-lib_9_2_2_20220307;
ghc-lib-parser = hself.ghc-lib-parser_9_2_2_20220307;
ghc-lib-parser-ex = hself.ghc-lib-parser-ex_9_2_0_3;

Cabal = hself.Cabal_3_6_3_0;
ormolu = hself.ormolu_0_4_0_0;
fourmolu = hself.fourmolu_0_6_0_0;

# Hlint is still broken
hlint = doJailbreak (hself.callCabal2nix "hlint" inputs.hlint-34 { });

hls-hlint-plugin = hself.callCabal2nixWithOptions "hls-hlint-plugin"
./plugins/hls-hlint-plugin
(pkgs.lib.concatStringsSep " " [ "-fhlint34" "-fghc-lib" ]) { };

# Re-generate HLS drv excluding some plugins
haskell-language-server =
hself.callCabal2nixWithOptions "haskell-language-server" ./.
(pkgs.lib.concatStringsSep " " [ "-f-brittany" "-f-stylishhaskell" ])
{ };
});
in {
inherit disabledPlugins;
tweakHpkgs = hpkgs: hpkgs.extend hpkgsOverride;
}
40 changes: 40 additions & 0 deletions configuration-ghc-92.nix
@@ -0,0 +1,40 @@
{ pkgs, inputs }:

let
disabledPlugins = [
"hls-hlint-plugin"
# That one is not technically a plugin, but by putting it in this list, we
# get it removed from the top level list of requirement and it is not pull
# in the nix shell.
"shake-bench"
];

hpkgsOverride = hself: hsuper:
with pkgs.haskell.lib;
{
hlsDisabledPlugins = disabledPlugins;
# YOLO
mkDerivation = args:
hsuper.mkDerivation (args // {
jailbreak = true;
doCheck = false;
});
} // (builtins.mapAttrs (_: drv: disableLibraryProfiling drv) {
# ptr-poker breaks on MacOS without SSE2 optimizations
# https://github.com/nikita-volkov/ptr-poker/issues/11
ptr-poker = hself.callCabal2nix "ptr-poker" inputs.ptr-poker { };

ghc-exactprint =
hself.callCabal2nix "ghc-exactprint" inputs.ghc-exactprint-150 { };
# Hlint is still broken
hlint = doJailbreak (hself.callCabal2nix "hlint" inputs.hlint { });

# Re-generate HLS drv excluding some plugins
haskell-language-server =
hself.callCabal2nixWithOptions "haskell-language-server" ./.
(pkgs.lib.concatStringsSep " " [ "-fpedantic" "-f-hlint" ]) { };
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This line should be in sync with disabledPlugins above.

Also, I'm surprised that there is less disabledPlugins with GHC 9.2 compared to GHC 9.0. Is that a mistake or is our support for GHC 9.2 better than 9.0?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

disabled "hls-hlint-plugin".

re > why 922 builds more plugins than 902

I have no idea, sorry. Anyone else can help with this?

});
in {
inherit disabledPlugins;
tweakHpkgs = hpkgs: hpkgs.extend hpkgsOverride;
}
2 changes: 1 addition & 1 deletion docs/requirements.txt
@@ -1,4 +1,4 @@
Sphinx==4.0.2
sphinx-rtd-theme==0.5.2
myst-parser==0.15.1
docutils<0.17
docutils<0.19
32 changes: 32 additions & 0 deletions docutils.nix
@@ -0,0 +1,32 @@
{ stdenv, lib, fetchPypi, buildPythonPackage, isPy3k, python }:
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nixpkgs contains docutils 0.18. Is there a reason to package docutils 0.17? Instead could you bump nixpkgs?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The RTD theme doesn't work with newer docutils, hence the anchor on docutils-0.17

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ha, great.


buildPythonPackage rec {
pname = "docutils";
version = "0.17.1";

src = fetchPypi {
inherit pname version;
sha256 = "686577d2e4c32380bb50cbb22f575ed742d58168cee37e99117a854bcd88f125";
};

# Only Darwin needs LANG, but we could set it in general.
# It's done here conditionally to prevent mass-rebuilds.
checkPhase = lib.optionalString (isPy3k && stdenv.isDarwin)
''LANG="en_US.UTF-8" LC_ALL="en_US.UTF-8" '' + ''
${python.interpreter} test/alltests.py
'';

# Create symlinks lacking a ".py" suffix, many programs depend on these names
postFixup = ''
for f in $out/bin/*.py; do
ln -s $(basename $f) $out/bin/$(basename $f .py)
done
'';

meta = with lib; {
description = "Python Documentation Utilities";
homepage = "http://docutils.sourceforge.net/";
license = with licenses; [ publicDomain bsd2 psfl gpl3Plus ];
maintainers = with maintainers; [ AndersonTorres ];
};
}