forked from haskell/haskell-language-server
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathconfiguration-ghc-96.nix
61 lines (52 loc) · 2.21 KB
/
configuration-ghc-96.nix
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
{ pkgs, inputs }:
let
disabledPlugins = [
# That one is not technically a plugin, but by putting it in this list, we
# get it removed from the top level list of requirement and it is not pull
# in the nix shell.
"shake-bench"
"hls-retrie-plugin"
"hls-splice-plugin"
"hls-class-plugin"
"hls-rename-plugin"
"hls-gadt-plugin"
"hls-refactor-plugin"
];
hpkgsOverride = hself: hsuper:
with pkgs.haskell.lib;
{
hlsDisabledPlugins = disabledPlugins;
# Override for all derivation
# If they are considered as broken, we just disable jailbreak and hope for the best
mkDerivation = args:
hsuper.mkDerivation (args //
{
jailbreak = true;
broken = false;
doCheck = false;
});
apply-refact = hsuper.apply-refact_0_13_0_0;
tagged = hsuper.tagged_0_8_7;
primitive = hsuper.primitive_0_8_0_0;
MonadRandom = hsuper.MonadRandom_0_6;
hie-bios = hself.callCabal2nix "hie-bios" inputs.haskell-hie-bios { };
hlint = hself.callCabal2nix "hlint" inputs.hlint-36 {};
implicit-hie-cradle = hself.callCabal2nix "implicit-hie-cradle" inputs.haskell-implicit-hie-cradle { };
fourmolu = hself.callCabal2nix "fourmolu" inputs.fourmolu-012 {};
ghc-lib-parser-ex = hsuper.ghc-lib-parser-ex_9_6_0_0;
ormolu = hself.callCabal2nix "ormolu" inputs.ormolu-07 {};
stylish-haskell = hself.callCabal2nix "stylish-haskell" inputs.stylish-haskell-0145 {};
lsp = hself.callCabal2nix "lsp" inputs.lsp {};
lsp-types = hself.callCabal2nix "lsp-types" inputs.lsp-types {};
lsp-test = dontCheck (hself.callCabal2nix "lsp-test" inputs.lsp-test {});
# Re-generate HLS drv excluding some plugins
haskell-language-server =
hself.callCabal2nixWithOptions "haskell-language-server" ./.
# Pedantic cannot be used due to -Werror=unused-top-binds
# Check must be disabled due to some missing required files
(pkgs.lib.concatStringsSep " " [ "--no-check" "-f-pedantic" "-f-hlint" "-f-refactor" "-f-retrie" "-f-class" "-f-gadt" "-f-splice" "-f-rename" ]) { };
};
in {
inherit disabledPlugins;
tweakHpkgs = hpkgs: hpkgs.extend hpkgsOverride;
}