Skip to content

Commit a90444e

Browse files
committed
Use hls master branch for testing hls
1 parent 9843757 commit a90444e

File tree

4 files changed

+37
-10
lines changed

4 files changed

+37
-10
lines changed

build.nix

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -57,10 +57,15 @@ in rec {
5757
inherit evalPackages;
5858
src = pkgs.haskell-nix.sources."hls-2.2";
5959
};
60-
} // pkgs.lib.optionalAttrs (ghcFromTo "9.0" "9.8.3" || ghcFromTo "9.10" "9.11") {
61-
"hls-29" = tool compiler-nix-name "haskell-language-server" {
60+
} // pkgs.lib.optionalAttrs (ghcFromTo "9.0" "9.11") {
61+
"hls" = tool compiler-nix-name "haskell-language-server" {
6262
inherit evalPackages;
63-
src = pkgs.haskell-nix.sources."hls-2.9";
63+
src = pkgs.haskell-nix.sources.hls;
64+
cabalProjectLocal = ''
65+
if impl(ghc >=9.6.7) && impl(ghc <9.7) || impl(ghc >=9.8.3)
66+
constraints: ghc-lib-parser >=9.8.4
67+
allow-older: ghc-lib-parser:filepath
68+
'';
6469
};
6570
})
6671
);

flake.lock

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

flake.nix

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@
1919
"hls-2.7" = { url = "github:haskell/haskell-language-server/2.7.0.0"; flake = false; };
2020
"hls-2.8" = { url = "github:haskell/haskell-language-server/2.8.0.0"; flake = false; };
2121
"hls-2.9" = { url = "github:haskell/haskell-language-server/2.9.0.1"; flake = false; };
22+
"hls" = { url = "github:haskell/haskell-language-server"; flake = false; };
2223
hackage = {
2324
url = "github:input-output-hk/hackage.nix";
2425
flake = false;
Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,15 @@
1-
{ stdenv, testSrc, haskell-nix, compiler-nix-name, evalPackages, recurseIntoAttrs, buildPackages }:
1+
{ lib, stdenv, testSrc, haskell-nix, compiler-nix-name, evalPackages, recurseIntoAttrs, buildPackages }:
22
let
33
project = haskell-nix.cabalProject' {
44
inherit compiler-nix-name evalPackages;
55
name = "haskell-language-server";
6-
src = haskell-nix.sources."hls-2.9";
6+
src = haskell-nix.sources.hls;
77
configureArgs = "--disable-benchmarks --disable-tests"; # This makes cabalProject' more like the `tool` function
8+
cabalProjectLocal = ''
9+
if impl(ghc >=9.6.7) && impl(ghc <9.7) || impl(ghc >=9.8.3)
10+
constraints: ghc-lib-parser >=9.8.4
11+
allow-older: ghc-lib-parser:filepath
12+
'';
813
};
914
in recurseIntoAttrs {
1015
ifdInputs = {
@@ -16,6 +21,5 @@ in recurseIntoAttrs {
1621
meta.disabled =
1722
stdenv.hostPlatform != stdenv.buildPlatform
1823
|| __compareVersions buildPackages.haskell-nix.compiler.${compiler-nix-name}.version "9.0.1" < 0
19-
|| __compareVersions buildPackages.haskell-nix.compiler.${compiler-nix-name}.version "9.11.0" >= 0
20-
|| __elem compiler-nix-name ["ghc983" "ghc984"];
24+
|| __compareVersions buildPackages.haskell-nix.compiler.${compiler-nix-name}.version "9.11.0" >= 0;
2125
}

0 commit comments

Comments
 (0)