Skip to content

Commit

Permalink
bump hackageNix, HLS 1.8 or latest depending of ghc version
Browse files Browse the repository at this point in the history
 and use haskell.nix cabal.
  • Loading branch information
jbgi committed Jan 12, 2023
1 parent f6446f6 commit 1791c0c
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 10 deletions.
6 changes: 3 additions & 3 deletions flake.lock

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

16 changes: 9 additions & 7 deletions nix/pkgs.nix
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
# our packages overlay
final: prev: with final; {

last-index-state = lib.last (builtins.attrNames (import haskell-nix.indexStateHashesPath));

inherit (cardanoNodeProject.args) compiler-nix-name;

# The is used by nix/regenerate.sh to pre-compute package list to avoid double evaluation.
Expand All @@ -9,10 +11,7 @@ final: prev: with final; {
cardanoNodeProject.hsPkgs))
(name: lib.attrNames cardanoNodeProject.pkg-set.options.packages.value.${name}.components.exes);

cabal = haskell-nix.tool compiler-nix-name "cabal" {
version = "latest";
inherit (cardanoNodeProject) index-state;
};
cabal = haskell-nix.cabal-install.${compiler-nix-name};

hlint = haskell-nix.tool compiler-nix-name "hlint" {
version = "3.2.7";
Expand All @@ -24,9 +23,12 @@ final: prev: with final; {
inherit (cardanoNodeProject) index-state;
};

haskell-language-server = haskell-nix.tool compiler-nix-name "haskell-language-server" {
version = "latest";
inherit (cardanoNodeProject) index-state;
haskell-language-server = haskell-nix.tool "ghc8107" "haskell-language-server" {
# latest ghcide does not compile on ghc 8.10.7
version = {ghc8107 = "1.8.0.0";}.${compiler-nix-name} or "latest";
# always use last index to be safe for "latest" version.
# (and be explicit about it to avoid warning)
index-state = {ghc8107 = "2022-12-11T00:00:00Z";}.${compiler-nix-name} or last-index-state;
};

haskellBuildUtils = prev.haskellBuildUtils.override {
Expand Down

0 comments on commit 1791c0c

Please sign in to comment.