Skip to content

Commit 73b02ef

Browse files
authored
Fix nix developement shell (#3257)
Upgrade a few packages which needed upgrade and avoid building hiedb in nix as it has a dependency on a package in this repository (hie-compat).
1 parent 8fd2b89 commit 73b02ef

File tree

2 files changed

+91
-18
lines changed

2 files changed

+91
-18
lines changed

flake.lock

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

flake.nix

Lines changed: 31 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -28,11 +28,15 @@
2828

2929
# List of hackage dependencies
3030
lsp = {
31-
url = "github:haskell/lsp/b0f8596887088b8ab65fc1015c773f45b47234ae";
31+
url = "https://hackage.haskell.org/package/lsp-1.6.0.0/lsp-1.6.0.0.tar.gz";
32+
flake = false;
33+
};
34+
lsp-types = {
35+
url = "https://hackage.haskell.org/package/lsp-types-1.6.0.0/lsp-types-1.6.0.0.tar.gz";
3236
flake = false;
3337
};
3438
lsp-test = {
35-
url = "https://hackage.haskell.org/package/lsp-test-0.14.0.3/lsp-test-0.14.0.3.tar.gz";
39+
url = "https://hackage.haskell.org/package/lsp-test-0.14.1.0/lsp-test-0.14.1.0.tar.gz";
3640
flake = false;
3741
};
3842
ghc-exactprint-150 = {
@@ -43,6 +47,10 @@
4347
url = "https://hackage.haskell.org/package/ghc-exactprint-1.4.1/ghc-exactprint-1.4.1.tar.gz";
4448
flake = false;
4549
};
50+
ghc-check = {
51+
url = "https://hackage.haskell.org/package/ghc-check-0.5.0.8/ghc-check-0.5.0.8.tar.gz";
52+
flake = false;
53+
};
4654
constraints-extras = {
4755
url = "https://hackage.haskell.org/package/constraints-extras-0.3.2.1/constraints-extras-0.3.2.1.tar.gz";
4856
flake = false;
@@ -91,6 +99,14 @@
9199
url = "https://hackage.haskell.org/package/hie-bios-0.11.0/hie-bios-0.11.0.tar.gz";
92100
flake = false;
93101
};
102+
entropy = {
103+
url = "https://hackage.haskell.org/package/entropy-0.4.1.10/entropy-0.4.1.10.tar.gz";
104+
flake = false;
105+
};
106+
hiedb = {
107+
url = "https://hackage.haskell.org/package/hiedb-0.4.2.0/hiedb-0.4.2.0.tar.gz";
108+
flake = false;
109+
};
94110
};
95111
outputs =
96112
inputs@{ self, nixpkgs, flake-compat, flake-utils, gitignore, all-cabal-hashes-unpacked, ... }:
@@ -138,6 +154,13 @@
138154
hls-plugin-api = ./hls-plugin-api;
139155
hls-test-utils = ./hls-test-utils;
140156
ghcide-test-utils = ./ghcide/test;
157+
# hiedb depends on hie-compact, which is part of this repository. If
158+
# cabal inside the nix development shell tries to use the hiedb
159+
# compiled inside nix, it thinks that this package is broken and
160+
# does nothing. Adding this here ensures that hiedb compiled in nix
161+
# is not available to cabal and then cabal downloads hiedb from
162+
# hackage and compiles it.
163+
hiedb = inputs.hiedb;
141164
} // pluginSourceDirs;
142165

143166
# Tweak our packages
@@ -149,12 +172,15 @@
149172
# GHCIDE requires hie-bios ^>=0.9.1
150173
hie-bios = hself.callCabal2nix "hie-bios" inputs.hie-bios {};
151174

152-
lsp = hsuper.callCabal2nix "lsp" "${inputs.lsp}/lsp" {};
153-
lsp-types = hsuper.callCabal2nix "lsp-types" "${inputs.lsp}/lsp-types" {};
175+
lsp = hsuper.callCabal2nix "lsp" inputs.lsp {};
176+
lsp-types = hsuper.callCabal2nix "lsp-types" inputs.lsp-types {};
154177
lsp-test = hsuper.callCabal2nix "lsp-test" inputs.lsp-test {};
155178

156-
implicit-hie-cradle = hself.callCabal2nix "implicit-hie-cradle" inputs.implicit-hie-cradle {};
179+
entropy = hsuper.callCabal2nix "entropy" inputs.entropy {};
180+
hiedb = hsuper.callCabal2nix "hiedb" inputs.hiedb {};
157181

182+
implicit-hie-cradle = hself.callCabal2nix "implicit-hie-cradle" inputs.implicit-hie-cradle {};
183+
ghc-check = hself.callCabal2nix "ghc-check" inputs.ghc-check {};
158184
# https://github.com/NixOS/nixpkgs/issues/140774
159185
ormolu =
160186
if final.system == "aarch64-darwin"

0 commit comments

Comments
 (0)