Skip to content

nix: add support for ghc 9.0.1 #1995

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

Merged
merged 17 commits into from
Jul 4, 2021
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Try to disable plugins properly
  • Loading branch information
berberman committed Jul 2, 2021
commit 2126a1571ad21228d6db8aab79cada901ff14388
25 changes: 13 additions & 12 deletions configuration-ghc-901.nix
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ let
"hls-fourmolu-plugin"
"hls-splice-plugin"
"hls-ormolu-plugin"
"hls-eval-plugin"
];
hpkgsOverride = hself: hsuper:
with pkgs.haskell.lib;
Expand Down Expand Up @@ -84,17 +85,17 @@ let

ghc-lib-parser-ex = hself.ghc-lib-parser-ex_9_0_0_4;

# Disable plugins
# Re-generate HLS drv excluding some plugins
haskell-language-server =
appendConfigureFlags hsuper.haskell-language-server [
"-brittany"
"-eval"
"-fourmolu"
"-ormolu"
"-splice"
"-stylishhaskell"
"-tactic"
"-refineImports"
];
hself.callCabal2nixWithOptions "haskell-language-server" ./.
(pkgs.lib.concatStringsSep " " [
"-f-brittany"
"-f-eval"
"-f-fourmolu"
"-f-ormolu"
"-f-splice"
"-f-stylishhaskell"
"-f-tactic"
]) { };
};
in { tweakHpkgs = hpkgs: (removePluginPackages hpkgs).extend hpkgsOverride; }
in { tweakHpkgs = hpkgs: removePluginPackages (hpkgs.extend hpkgsOverride); }
2 changes: 1 addition & 1 deletion flake.nix
Original file line number Diff line number Diff line change
Expand Up @@ -179,7 +179,7 @@
# we can remove sources attrs from hpkgs to exclude HLS plugins,
# so hpkgs may not be the superset of hlsSources
pipe (attrNames hlsSources) [
(xs: map (name: p.${name} or null) xs)
(xs: map (name: if hpkgs ? name then p.${name} else null) xs)
(xs: remove null xs)
];
buildInputs = [ gmp zlib ncurses capstone tracy (gen-hls-changelogs hpkgs) ]
Expand Down