Skip to content

Commit e341c44

Browse files
committed
nix: rm ghc 810, ghc88 + disableLibraryProfiling
1 parent 0cac0b6 commit e341c44

File tree

5 files changed

+86
-128
lines changed

5 files changed

+86
-128
lines changed

configuration-ghc-810.nix

Lines changed: 0 additions & 58 deletions
This file was deleted.

configuration-ghc-88.nix

Lines changed: 0 additions & 58 deletions
This file was deleted.

configuration-ghc-90.nix

Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
{ pkgs, inputs }:
2+
3+
let
4+
disabledPlugins = [ "hls-brittany-plugin" "hls-stylish-haskell-plugin" ];
5+
6+
hpkgsOverride = hself: hsuper:
7+
with pkgs.haskell.lib;
8+
{
9+
hlsDisabledPlugins = disabledPlugins;
10+
# YOLO
11+
mkDerivation = args:
12+
hsuper.mkDerivation (args // {
13+
jailbreak = true;
14+
doCheck = false;
15+
});
16+
} // (builtins.mapAttrs (_: drv: disableLibraryProfiling drv) {
17+
# ptr-poker breaks on MacOS without SSE2 optimizations
18+
# https://github.com/nikita-volkov/ptr-poker/issues/11
19+
ptr-poker = hself.callCabal2nix "ptr-poker" inputs.ptr-poker { };
20+
21+
ghc-lib = hself.ghc-lib_9_2_2_20220307;
22+
ghc-lib-parser = hself.ghc-lib-parser_9_2_2_20220307;
23+
ghc-lib-parser-ex = hself.ghc-lib-parser-ex_9_2_0_3;
24+
25+
Cabal = hself.Cabal_3_6_3_0;
26+
ormolu = hself.ormolu_0_4_0_0;
27+
fourmolu = hself.fourmolu_0_6_0_0;
28+
29+
# Hlint is still broken
30+
hlint = doJailbreak (hself.callCabal2nix "hlint" inputs.hlint-34 { });
31+
32+
hls-hlint-plugin = hself.callCabal2nixWithOptions "hls-hlint-plugin"
33+
./plugins/hls-hlint-plugin
34+
(pkgs.lib.concatStringsSep " " [ "-fhlint34" "-fghc-lib" ]) { };
35+
36+
# Re-generate HLS drv excluding some plugins
37+
haskell-language-server =
38+
hself.callCabal2nixWithOptions "haskell-language-server" ./.
39+
(pkgs.lib.concatStringsSep " " [ "-f-brittany" "-f-stylishhaskell" ])
40+
{ };
41+
});
42+
in {
43+
inherit disabledPlugins;
44+
tweakHpkgs = hpkgs: hpkgs.extend hpkgsOverride;
45+
}

configuration-ghc-92.nix

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
{ pkgs, inputs }:
2+
3+
let
4+
disabledPlugins = [
5+
# That one is not technically a plugin, but by putting it in this list, we
6+
# get it removed from the top level list of requirement and it is not pull
7+
# in the nix shell.
8+
"shake-bench"
9+
];
10+
11+
hpkgsOverride = hself: hsuper:
12+
with pkgs.haskell.lib;
13+
{
14+
hlsDisabledPlugins = disabledPlugins;
15+
# YOLO
16+
mkDerivation = args:
17+
hsuper.mkDerivation (args // {
18+
jailbreak = true;
19+
doCheck = false;
20+
});
21+
} // (builtins.mapAttrs (_: drv: disableLibraryProfiling drv) {
22+
# ptr-poker breaks on MacOS without SSE2 optimizations
23+
# https://github.com/nikita-volkov/ptr-poker/issues/11
24+
ptr-poker = hself.callCabal2nix "ptr-poker" inputs.ptr-poker { };
25+
26+
ghc-exactprint =
27+
hself.callCabal2nix "ghc-exactprint" inputs.ghc-exactprint-150 { };
28+
# Hlint is still broken
29+
hlint = doJailbreak (hself.callCabal2nix "hlint" inputs.hlint { });
30+
31+
# Re-generate HLS drv excluding some plugins
32+
haskell-language-server =
33+
hself.callCabal2nixWithOptions "haskell-language-server" ./.
34+
(pkgs.lib.concatStringsSep " " [ "-fpedantic" "-f-hlint" ]) { };
35+
});
36+
in {
37+
inherit disabledPlugins;
38+
tweakHpkgs = hpkgs: hpkgs.extend hpkgsOverride;
39+
}

flake.nix

Lines changed: 2 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -123,6 +123,8 @@
123123
in hsuper.mkDerivation (args // {
124124
jailbreak = if broken then true else jailbreak;
125125
doCheck = if broken then false else check;
126+
enableLibraryProfiling = false;
127+
doHaddock = false;
126128
});
127129
};
128130
gitignoreSource = (import gitignore { inherit lib; }).gitignoreSource;
@@ -242,24 +244,18 @@
242244
};
243245
};
244246

245-
ghc88Config = (import ./configuration-ghc-88.nix) { inherit pkgs inputs; };
246-
ghc810Config = (import ./configuration-ghc-810.nix) { inherit pkgs inputs; };
247247
ghc902Config = (import ./configuration-ghc-90.nix) { inherit pkgs inputs; };
248248
ghc922Config = (import ./configuration-ghc-92.nix) { inherit pkgs inputs; };
249249

250250
# GHC versions
251251
supportedGHCs = let
252252
ghcVersion = "ghc" + (pkgs.lib.replaceStrings ["."] [""] pkgs.haskellPackages.ghc.version);
253253
cases = {
254-
ghc884 = ghc88Config.tweakHpkgs (pkgs.hlsHpkgs "ghc884");
255-
ghc8107 = ghc810Config.tweakHpkgs (pkgs.hlsHpkgs "ghc8107");
256254
ghc902 = ghc902Config.tweakHpkgs (pkgs.hlsHpkgs "ghc902");
257255
ghc922 = ghc922Config.tweakHpkgs (pkgs.hlsHpkgs "ghc922");
258256
};
259257
in { default = cases."${ghcVersion}"; } // cases;
260258

261-
ghc884 = supportedGHCs.ghc884;
262-
ghc8107 = supportedGHCs.ghc8107;
263259
ghc902 = supportedGHCs.ghc902;
264260
ghc922 = supportedGHCs.ghc922;
265261
ghcDefault = supportedGHCs.default;
@@ -388,25 +384,19 @@
388384
# Developement shell with only compiler
389385
simpleDevShells = {
390386
haskell-language-server-dev = mkDevShell ghcDefault "cabal.project";
391-
# haskell-language-server-884-dev = mkDevShell ghc884 "cabal.project";
392-
haskell-language-server-8107-dev = mkDevShell ghc8107 "cabal.project";
393387
haskell-language-server-902-dev = mkDevShell ghc902 "cabal.project";
394388
haskell-language-server-922-dev = mkDevShell ghc922 "cabal.project";
395389
};
396390

397391
# Developement shell, haskell packages are also provided by nix
398392
nixDevShells = {
399393
haskell-language-server-dev-nix = mkDevShellWithNixDeps ghcDefault "cabal.project";
400-
# haskell-language-server-884-dev-nix = mkDevShellWithNixDeps ghc884 "cabal.project";
401-
haskell-language-server-8107-dev-nix = mkDevShellWithNixDeps ghc8107 "cabal.project";
402394
haskell-language-server-902-dev-nix = mkDevShellWithNixDeps ghc902 "cabal.project";
403395
haskell-language-server-922-dev-nix = mkDevShellWithNixDeps ghc921 "cabal.project";
404396
};
405397

406398
allPackages = {
407399
haskell-language-server = mkExe ghcDefault;
408-
# haskell-language-server-884 = mkExe ghc884;
409-
haskell-language-server-8107 = mkExe ghc8107;
410400
haskell-language-server-902 = mkExe ghc902;
411401
haskell-language-server-922 = mkExe ghc922;
412402
};

0 commit comments

Comments
 (0)