Skip to content

Commit 2126a15

Browse files
committed
Try to disable plugins properly
1 parent 978f060 commit 2126a15

File tree

2 files changed

+14
-13
lines changed

2 files changed

+14
-13
lines changed

configuration-ghc-901.nix

+13-12
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ let
1010
"hls-fourmolu-plugin"
1111
"hls-splice-plugin"
1212
"hls-ormolu-plugin"
13+
"hls-eval-plugin"
1314
];
1415
hpkgsOverride = hself: hsuper:
1516
with pkgs.haskell.lib;
@@ -84,17 +85,17 @@ let
8485

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

87-
# Disable plugins
88+
# Re-generate HLS drv excluding some plugins
8889
haskell-language-server =
89-
appendConfigureFlags hsuper.haskell-language-server [
90-
"-brittany"
91-
"-eval"
92-
"-fourmolu"
93-
"-ormolu"
94-
"-splice"
95-
"-stylishhaskell"
96-
"-tactic"
97-
"-refineImports"
98-
];
90+
hself.callCabal2nixWithOptions "haskell-language-server" ./.
91+
(pkgs.lib.concatStringsSep " " [
92+
"-f-brittany"
93+
"-f-eval"
94+
"-f-fourmolu"
95+
"-f-ormolu"
96+
"-f-splice"
97+
"-f-stylishhaskell"
98+
"-f-tactic"
99+
]) { };
99100
};
100-
in { tweakHpkgs = hpkgs: (removePluginPackages hpkgs).extend hpkgsOverride; }
101+
in { tweakHpkgs = hpkgs: removePluginPackages (hpkgs.extend hpkgsOverride); }

flake.nix

+1-1
Original file line numberDiff line numberDiff line change
@@ -179,7 +179,7 @@
179179
# we can remove sources attrs from hpkgs to exclude HLS plugins,
180180
# so hpkgs may not be the superset of hlsSources
181181
pipe (attrNames hlsSources) [
182-
(xs: map (name: p.${name} or null) xs)
182+
(xs: map (name: if hpkgs ? name then p.${name} else null) xs)
183183
(xs: remove null xs)
184184
];
185185
buildInputs = [ gmp zlib ncurses capstone tracy (gen-hls-changelogs hpkgs) ]

0 commit comments

Comments
 (0)