Skip to content

Fix nix developement shell #3257

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Oct 7, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
73 changes: 60 additions & 13 deletions flake.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

36 changes: 31 additions & 5 deletions flake.nix
Original file line number Diff line number Diff line change
Expand Up @@ -28,11 +28,15 @@

# List of hackage dependencies
lsp = {
url = "github:haskell/lsp/b0f8596887088b8ab65fc1015c773f45b47234ae";
url = "https://hackage.haskell.org/package/lsp-1.6.0.0/lsp-1.6.0.0.tar.gz";
flake = false;
};
lsp-types = {
url = "https://hackage.haskell.org/package/lsp-types-1.6.0.0/lsp-types-1.6.0.0.tar.gz";
flake = false;
};
lsp-test = {
url = "https://hackage.haskell.org/package/lsp-test-0.14.0.3/lsp-test-0.14.0.3.tar.gz";
url = "https://hackage.haskell.org/package/lsp-test-0.14.1.0/lsp-test-0.14.1.0.tar.gz";
flake = false;
};
ghc-exactprint-150 = {
Expand All @@ -43,6 +47,10 @@
url = "https://hackage.haskell.org/package/ghc-exactprint-1.4.1/ghc-exactprint-1.4.1.tar.gz";
flake = false;
};
ghc-check = {
url = "https://hackage.haskell.org/package/ghc-check-0.5.0.8/ghc-check-0.5.0.8.tar.gz";
flake = false;
};
constraints-extras = {
url = "https://hackage.haskell.org/package/constraints-extras-0.3.2.1/constraints-extras-0.3.2.1.tar.gz";
flake = false;
Expand Down Expand Up @@ -91,6 +99,14 @@
url = "https://hackage.haskell.org/package/hie-bios-0.11.0/hie-bios-0.11.0.tar.gz";
flake = false;
};
entropy = {
url = "https://hackage.haskell.org/package/entropy-0.4.1.10/entropy-0.4.1.10.tar.gz";
flake = false;
};
hiedb = {
url = "https://hackage.haskell.org/package/hiedb-0.4.2.0/hiedb-0.4.2.0.tar.gz";
flake = false;
};
};
outputs =
inputs@{ self, nixpkgs, flake-compat, flake-utils, gitignore, all-cabal-hashes-unpacked, ... }:
Expand Down Expand Up @@ -138,6 +154,13 @@
hls-plugin-api = ./hls-plugin-api;
hls-test-utils = ./hls-test-utils;
ghcide-test-utils = ./ghcide/test;
# hiedb depends on hie-compact, which is part of this repository. If
# cabal inside the nix development shell tries to use the hiedb
# compiled inside nix, it thinks that this package is broken and
# does nothing. Adding this here ensures that hiedb compiled in nix
# is not available to cabal and then cabal downloads hiedb from
# hackage and compiles it.
hiedb = inputs.hiedb;
} // pluginSourceDirs;

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

lsp = hsuper.callCabal2nix "lsp" "${inputs.lsp}/lsp" {};
lsp-types = hsuper.callCabal2nix "lsp-types" "${inputs.lsp}/lsp-types" {};
lsp = hsuper.callCabal2nix "lsp" inputs.lsp {};
lsp-types = hsuper.callCabal2nix "lsp-types" inputs.lsp-types {};
lsp-test = hsuper.callCabal2nix "lsp-test" inputs.lsp-test {};

implicit-hie-cradle = hself.callCabal2nix "implicit-hie-cradle" inputs.implicit-hie-cradle {};
entropy = hsuper.callCabal2nix "entropy" inputs.entropy {};
hiedb = hsuper.callCabal2nix "hiedb" inputs.hiedb {};

implicit-hie-cradle = hself.callCabal2nix "implicit-hie-cradle" inputs.implicit-hie-cradle {};
ghc-check = hself.callCabal2nix "ghc-check" inputs.ghc-check {};
# https://github.com/NixOS/nixpkgs/issues/140774
ormolu =
if final.system == "aarch64-darwin"
Expand Down