Skip to content

Commit daf7492

Browse files
committed
nix: remove special case for different ghc versions
1 parent 7ffd343 commit daf7492

File tree

3 files changed

+6
-6
lines changed

3 files changed

+6
-6
lines changed

configuration-ghc-901.nix

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,8 @@ let
1010
hpkgsOverride = hself: hsuper:
1111
with pkgs.haskell.lib;
1212
{
13+
hlsDisabledPlugins = disabledPlugins;
14+
1315
fourmolu = hself.fourmolu_0_4_0_0;
1416
primitive-extras = hself.primitive-extras_0_10_1_2;
1517

configuration-ghc-921.nix

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,8 @@ let
1919
hpkgsOverride = hself: hsuper:
2020
with pkgs.haskell.lib;
2121
{
22+
hlsDisabledPlugins = disabledPlugins;
23+
2224
fourmolu = hself.callCabal2nix "fourmolu" inputs.fourmolu {};
2325
primitive-extras = hself.primitive-extras_0_10_1_2;
2426
ghc-exactprint = hself.callCabal2nix "ghc-exactprint" inputs.ghc-exactprint {};

flake.nix

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -245,12 +245,8 @@
245245
packages = p:
246246
with builtins;
247247
map (name: p.${name}) (attrNames
248-
(if hpkgs.ghc.version == "9.0.1" then
249-
removeAttrs hlsSources ghc901Config.disabledPlugins
250-
else if hpkgs.ghc.version == "9.2.1" then
251-
removeAttrs hlsSources ghc921Config.disabledPlugins
252-
else
253-
hlsSources));
248+
# Disable dependencies should not be part of the shell.
249+
(removeAttrs hlsSources (hpkgs.hlsDisabledPlugins or [])));
254250
# For theses tools packages, we use ghcDefault
255251
# This removes a rebuild with a different GHC version
256252
# Theses programs are tools, used as binary, independently of the

0 commit comments

Comments
 (0)