Skip to content

Commit 7c18f51

Browse files
committed
add configuration tweak for ghc8107
1 parent f4f8185 commit 7c18f51

File tree

2 files changed

+61
-1
lines changed

2 files changed

+61
-1
lines changed

configuration-ghc-810.nix

Lines changed: 59 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,59 @@
1+
# nix version of cabal-ghc901.project
2+
{ pkgs, inputs }:
3+
4+
let
5+
disabledPlugins = [
6+
"hls-brittany-plugin"
7+
"hls-hlint-plugin"
8+
"hls-stylish-haskell-plugin"
9+
"hls-haddock-comments-plugin"
10+
"hls-tactics-plugin"
11+
# That one is not technically a plugin, but by putting it in this list, we
12+
# get it removed from the top level list of requirement and it is not pull
13+
# in the nix shell.
14+
"shake-bench"
15+
];
16+
17+
hpkgsOverride = hself: hsuper:
18+
with pkgs.haskell.lib; {
19+
hlsDisabledPlugins = disabledPlugins;
20+
21+
ghc-lib = hself.ghc-lib_8_10_7_20220219;
22+
ghc-lib-parser = hself.ghc-lib-parser_8_10_7_20220219;
23+
24+
fourmolu = hself.callCabal2nix "fourmolu" inputs.fourmolu-0300 { };
25+
26+
stylish-haskell = hself.callCabal2nixWithOptions "stylish-haskell"
27+
inputs.stylish-haskell-01220 (pkgs.lib.concatStringsSep " " [ ]) { };
28+
29+
aeson = hself.callCabal2nixWithOptions "aeson" inputs.aeson-1520
30+
(pkgs.lib.concatStringsSep " " [ ]) { };
31+
32+
brittany = hself.callCabal2nixWithOptions "brittany" inputs.brittany-01312
33+
(pkgs.lib.concatStringsSep " " [ ]) { };
34+
35+
hls-hlint-plugin = hself.callCabal2nixWithOptions "hls-hlint-plugin"
36+
./plugins/hls-hlint-plugin
37+
(pkgs.lib.concatStringsSep " " [ "-f-hlint34" "-fhyphenation" ]) { };
38+
39+
# Re-generate HLS drv excluding some plugins
40+
haskell-language-server =
41+
hself.callCabal2nixWithOptions "haskell-language-server" ./.
42+
(pkgs.lib.concatStringsSep " " [
43+
"-fpedantic"
44+
"-f-hlint"
45+
"-f-fourmolu"
46+
"-f-ormolu"
47+
]) { };
48+
49+
# YOLO
50+
mkDerivation = args:
51+
hsuper.mkDerivation (args // {
52+
jailbreak = true;
53+
doCheck = false;
54+
});
55+
};
56+
in {
57+
inherit disabledPlugins;
58+
tweakHpkgs = hpkgs: hpkgs.extend hpkgsOverride;
59+
}

flake.nix

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -243,6 +243,7 @@
243243
};
244244

245245
ghc88Config = (import ./configuration-ghc-88.nix) { inherit pkgs inputs; };
246+
ghc810Config = (import ./configuration-ghc-810.nix) { inherit pkgs inputs; };
246247
ghc902Config = (import ./configuration-ghc-902.nix) { inherit pkgs inputs; };
247248
ghc922Config = (import ./configuration-ghc-922.nix) { inherit pkgs inputs; };
248249

@@ -251,7 +252,7 @@
251252
ghcVersion = "ghc" + (pkgs.lib.replaceStrings ["."] [""] pkgs.haskellPackages.ghc.version);
252253
cases = {
253254
ghc884 = ghc88Config.tweakHpkgs (pkgs.hlsHpkgs "ghc884");
254-
ghc8107 = pkgs.hlsHpkgs "ghc8107";
255+
ghc8107 = ghc810Config.tweakHpkgs (pkgs.hlsHpkgs "ghc8107");
255256
ghc902 = ghc902Config.tweakHpkgs (pkgs.hlsHpkgs "ghc902");
256257
ghc922 = ghc922Config.tweakHpkgs (pkgs.hlsHpkgs "ghc922");
257258
};

0 commit comments

Comments
 (0)