Skip to content

Commit 3dabe1e

Browse files
committed
wip: restore support for nix for GHC 921
Support was broken by #2866 where the configuration-ghc-921 file was removed. #2892 will indeed restore these file and fix the build with GHC 922, but I was in need a GHC 921 support at work.
1 parent 9e1738e commit 3dabe1e

File tree

2 files changed

+58
-3
lines changed

2 files changed

+58
-3
lines changed

configuration-ghc-921.nix

+55
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,55 @@
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-haddock-comments-plugin"
9+
"hls-tactics-plugin"
10+
"hls-stylish-haskell-plugin"
11+
"hls-class-plugin"
12+
# That one is not technically a plugin, but by putting it in this list, we
13+
# get it removed from the top level list of requirement and it is not pull
14+
# in the nix shell.
15+
"shake-bench"
16+
];
17+
18+
hpkgsOverride = hself: hsuper:
19+
with pkgs.haskell.lib;
20+
{
21+
hlsDisabledPlugins = disabledPlugins;
22+
23+
fourmolu = hself.callCabal2nix "fourmolu" inputs.fourmolu {};
24+
primitive-extras = hself.primitive-extras_0_10_1_2;
25+
ghc-exactprint = hself.callCabal2nix "ghc-exactprint" inputs.ghc-exactprint {};
26+
constraints-extras = hself.callCabal2nix "constraints-extras" inputs.constraints-extras {};
27+
retrie = hself.callCabal2nix "retrie" inputs.retrie {};
28+
29+
# Hlint is still broken
30+
hlint = doJailbreak (hself.callCabal2nix "hlint" inputs.hlint {});
31+
hiedb = hself.hiedb_0_4_1_0;
32+
33+
# Re-generate HLS drv excluding some plugins
34+
haskell-language-server =
35+
hself.callCabal2nixWithOptions "haskell-language-server" ./.
36+
(pkgs.lib.concatStringsSep " " [
37+
"-f-brittany"
38+
"-f-hlint"
39+
"-f-haddockComments"
40+
"-f-tactics"
41+
"-f-stylishHaskell"
42+
"-f-class"
43+
]) { };
44+
45+
# YOLO
46+
mkDerivation = args:
47+
hsuper.mkDerivation (args // {
48+
jailbreak = true;
49+
doCheck = false;
50+
});
51+
};
52+
in {
53+
inherit disabledPlugins;
54+
tweakHpkgs = hpkgs: hpkgs.extend hpkgsOverride;
55+
}

flake.lock

+3-3
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)