Skip to content

Commit 77af21e

Browse files
authored
Update nix to GHC 8.10.5 (#1991)
* Update nix to GHC 8.10.5 * Update hiedb 0.4.0
1 parent a0def3c commit 77af21e

File tree

2 files changed

+27
-32
lines changed

2 files changed

+27
-32
lines changed

flake.lock

Lines changed: 9 additions & 9 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

flake.nix

Lines changed: 18 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -73,25 +73,18 @@
7373
tweaks = hself: hsuper:
7474
with haskell.lib; {
7575

76-
# https://github.com/haskell/haskell-language-server/pull/1858
77-
# Remove this override when nixpkgs has this package
78-
apply-refact_0_9_3_0 = hself.callCabal2nix "apply-refact"
76+
hls-tactics-plugin = hsuper.hls-tactics-plugin.override {
77+
refinery = hself.refinery_0_3_0_0;
78+
};
79+
80+
hiedb = hself.callCabal2nix "hiedb"
7981
(builtins.fetchTarball {
8082
url =
81-
"https://hackage.haskell.org/package/apply-refact-0.9.3.0/apply-refact-0.9.3.0.tar.gz";
83+
"https://hackage.haskell.org/package/hiedb-0.4.0.0/hiedb-0.4.0.0.tar.gz";
8284
sha256 =
83-
"1jfq1aw91finlpq5nn7a96za4c8j13jk6jmx2867fildxwrik2qj";
85+
"13jz8c46zfpf54ya2wsv4akhn0wcfc6qjazqsjfir5gpvsi7v8xr";
8486
}) { };
8587

86-
hls-hlint-plugin = hsuper.hls-hlint-plugin.override {
87-
hlint = hself.hlint_3_2_7;
88-
apply-refact = hself.apply-refact_0_9_3_0;
89-
};
90-
91-
hls-tactics-plugin = hsuper.hls-tactics-plugin.override {
92-
refinery = hself.refinery_0_3_0_0;
93-
};
94-
9588
};
9689

9790
hlsSources =
@@ -112,8 +105,8 @@
112105
hlsHpkgs = compiler: extended haskell.packages.${compiler};
113106

114107
# Support of GenChangelogs.hs
115-
gen-hls-changelogs =
116-
let myGHC = haskellPackages.ghcWithPackages (p: with p; [ github ]);
108+
gen-hls-changelogs = hpkgs:
109+
let myGHC = hpkgs.ghcWithPackages (p: with p; [ github ]);
117110
in runCommand "gen-hls-changelogs" {
118111
passAsFile = [ "text" ];
119112
preferLocalBuild = true;
@@ -137,10 +130,12 @@
137130
};
138131

139132
# Pre-commit hooks to run stylish-haskell
140-
pre-commit-check = pre-commit-hooks.lib.${system}.run {
133+
pre-commit-check = hpkgs: pre-commit-hooks.lib.${system}.run {
141134
src = ./.;
142135
hooks = {
143136
stylish-haskell.enable = true;
137+
# use stylish-haskell with our target ghc
138+
stylish-haskell.entry = "${hpkgs.stylish-haskell}/bin/stylish-haskell --inplace";
144139
stylish-haskell.excludes = [
145140
# Ignored files
146141
"^Setup.hs$"
@@ -178,9 +173,9 @@
178173
doBenchmark = true;
179174
packages = p:
180175
with builtins;
181-
map (name: p.${name}) (attrNames pkgs.hlsSources);
182-
buildInputs = [ gmp zlib ncurses capstone tracy gen-hls-changelogs ]
183-
++ (with haskellPackages; [
176+
map (name: p.${name}) (attrNames hlsSources);
177+
buildInputs = [ gmp zlib ncurses capstone tracy (gen-hls-changelogs hpkgs) ]
178+
++ (with hpkgs; [
184179
cabal-install
185180
hlint
186181
ormolu
@@ -193,7 +188,7 @@
193188
export LD_LIBRARY_PATH=${gmp}/lib:${zlib}/lib:${ncurses}/lib:${capstone}/lib
194189
export DYLD_LIBRARY_PATH=${gmp}/lib:${zlib}/lib:${ncurses}/lib:${capstone}/lib
195190
export PATH=$PATH:$HOME/.local/bin
196-
${pre-commit-check.shellHook}
191+
${(pre-commit-check hpkgs).shellHook}
197192
'';
198193
};
199194
# Create a hls executable
@@ -218,14 +213,14 @@
218213
haskell-language-server-884-dev = mkDevShell ghc884;
219214
haskell-language-server-8104-dev = mkDevShell ghc8104;
220215
haskell-language-server-8105-dev = mkDevShell ghc8105;
221-
haskell-language-server-901-dev = mkDevShell ghc901;
216+
haskell-language-server-901-dev = builtins.throw "Nix expression for developing HLS in GHC 9.0.1 is not yet available"; # mkDevShell ghc901;
222217

223218
# hls package
224219
haskell-language-server = mkExe ghcDefault;
225220
haskell-language-server-884 = mkExe ghc884;
226221
haskell-language-server-8104 = mkExe ghc8104;
227222
haskell-language-server-8105 = mkExe ghc8105;
228-
haskell-language-server-901 = mkExe ghc901;
223+
haskell-language-server-901 = builtins.throw "Nix expression for building HLS in GHC 9.0.1 is not yet available"; # mkExe ghc901;
229224
};
230225

231226
defaultPackage = packages.haskell-language-server;

0 commit comments

Comments
 (0)