Skip to content

Commit 00350f3

Browse files
committed
Merge remote-tracking branch 'origin/master' into hkm/embed-file
2 parents f4ae605 + c8b4b5b commit 00350f3

File tree

11 files changed

+119
-37
lines changed

11 files changed

+119
-37
lines changed

build.nix

+8-4
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,11 @@ in rec {
2626

2727
tools = pkgs.lib.optionalAttrs (ifdLevel >= 3) (
2828
pkgs.recurseIntoAttrs ({
29-
cabal-latest = tool compiler-nix-name "cabal" { inherit evalPackages; };
29+
cabal-latest = tool compiler-nix-name "cabal" ({
30+
inherit evalPackages;
31+
} // pkgs.lib.optionalAttrs (ghcFromTo "9.10" "9.12") {
32+
cabalProjectLocal = builtins.readFile ./test/cabal.project.local;
33+
});
3034
} // pkgs.lib.optionalAttrs (__compareVersions haskell.compiler.${compiler-nix-name}.version "9.8" < 0) {
3135
hlint-latest = tool compiler-nix-name "hlint" {
3236
inherit evalPackages;
@@ -58,10 +62,10 @@ in rec {
5862
inherit evalPackages;
5963
src = pkgs.haskell-nix.sources."hls-2.2";
6064
};
61-
} // pkgs.lib.optionalAttrs (ghcFromTo "9.0" "9.10") {
62-
"hls-27" = tool compiler-nix-name "haskell-language-server" {
65+
} // pkgs.lib.optionalAttrs (ghcFromTo "9.0" "9.9") {
66+
"hls-28" = tool compiler-nix-name "haskell-language-server" {
6367
inherit evalPackages;
64-
src = pkgs.haskell-nix.sources."hls-2.7";
68+
src = pkgs.haskell-nix.sources."hls-2.8";
6569
};
6670
})
6771
);

ci.nix

+1-1
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@
7373
ghc96llvm = true;
7474
ghc98 = true;
7575
ghc98llvm = true;
76-
ghc910X = true;
76+
ghc910 = true;
7777
ghc911 = true;
7878
})));
7979
crossSystems = nixpkgsName: nixpkgs: compiler-nix-name:

flake.lock

+24-6
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

flake.nix

+1
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@
3131
"hls-2.5" = { url = "github:haskell/haskell-language-server/2.5.0.0"; flake = false; };
3232
"hls-2.6" = { url = "github:haskell/haskell-language-server/2.6.0.0"; flake = false; };
3333
"hls-2.7" = { url = "github:haskell/haskell-language-server/2.7.0.0"; flake = false; };
34+
"hls-2.8" = { url = "github:haskell/haskell-language-server/2.8.0.0"; flake = false; };
3435
hydra.url = "hydra";
3536
hackage = {
3637
url = "github:input-output-hk/hackage.nix";

lib/call-cabal-project-to-nix.nix

+5-5
Original file line numberDiff line numberDiff line change
@@ -290,7 +290,7 @@ let
290290

291291
ghcSrc = ghc.raw-src or ghc.buildGHC.raw-src;
292292

293-
fixPlatformString = x: builtins.replaceStrings ["-linux-gnu"] ["-linux"] x;
293+
platformString = p: with p.parsed; "${cpu.name}-${vendor.name}-${kernel.name}";
294294

295295
# Dummy `ghc` that uses the captured output
296296
dummy-ghc = evalPackages.writeTextFile {
@@ -341,10 +341,10 @@ let
341341
then "ArchJavaScript"
342342
else throw "Unknown target arch ${pkgs.stdenv.targetPlatform.config}"
343343
}")'
344-
echo ',("target platform string","${fixPlatformString pkgs.stdenv.targetPlatform.config}")'
345-
echo ',("Build platform","${fixPlatformString pkgs.stdenv.buildPlatform.config}")'
346-
echo ',("Host platform","${fixPlatformString pkgs.stdenv.hostPlatform.config}")'
347-
echo ',("Target platform","${fixPlatformString pkgs.stdenv.targetPlatform.config}")'
344+
echo ',("target platform string","${platformString pkgs.stdenv.targetPlatform}")'
345+
echo ',("Build platform","${platformString pkgs.stdenv.buildPlatform}")'
346+
echo ',("Host platform","${platformString pkgs.stdenv.hostPlatform}")'
347+
echo ',("Target platform","${platformString pkgs.stdenv.targetPlatform}")'
348348
echo ']'
349349
;;
350350
--print-libdir*)

modules/cabal-project.nix

-12
Original file line numberDiff line numberDiff line change
@@ -17,18 +17,6 @@ in {
1717
compiler-nix-name = mkOption {
1818
type = str;
1919
description = "The name of the ghc compiler to use eg. \"ghc884\"";
20-
# Map short version names to the latest GHC version.
21-
# TODO: perhaps combine this with the `latestVer` mapping in `overlays/boostrap.nix`.
22-
apply = name:
23-
let
24-
fullName = pkgs.haskell-nix.resolve-compiler-name name;
25-
ghc910FullName = pkgs.haskell-nix.resolve-compiler-name "ghc910X";
26-
ghc911FullName = pkgs.haskell-nix.resolve-compiler-name "ghc911";
27-
in
28-
# cabal-install from hackage (3.10.3.0) does not build with GHC HEAD
29-
if builtins.elem fullName [ ghc910FullName ghc911FullName ] && config.name == "cabal-install" && (builtins.elem config.version ["3.10.1.0" "3.10.2.0" "3.10.2.1" "3.10.3.0"])
30-
then "ghc964"
31-
else pkgs.haskell-nix.resolve-compiler-name name;
3220
};
3321
compilerSelection = mkOption {
3422
type = unspecified;

overlays/bootstrap.nix

+32-2
Original file line numberDiff line numberDiff line change
@@ -11,9 +11,9 @@ let
1111
"9.4" = "9.4.8";
1212
"9.6" = "9.6.5";
1313
"9.8" = "9.8.2";
14+
"9.10" = "9.10.1";
1415
};
1516
gitInputs = {
16-
ghc910X = "9.10.0";
1717
ghc911 = "9.11";
1818
};
1919
versionToNixName = v: "ghc${builtins.replaceStrings ["."] [""] v}";
@@ -279,6 +279,7 @@ in {
279279
++ final.lib.optional (versionAtLeast "9.6" && versionLessThan "9.8" && (final.stdenv.targetPlatform.isWindows || final.stdenv.targetPlatform.isMusl)) ./patches/ghc/ghc-9.6-0006-Adds-support-for-Hidden-symbols.patch
280280
++ final.lib.optional (versionAtLeast "9.6" && versionLessThan "9.8" && (final.stdenv.targetPlatform.isWindows || final.stdenv.targetPlatform.isMusl)) ./patches/ghc/ghc-9.6-0006-Adds-support-for-Hidden-symbols-2.patch
281281
++ fromUntil "9.9" "9.12" ./patches/ghc/ghc-9.9-Cabal-3.11.patch
282+
++ fromUntil "9.8" "9.9" ./patches/ghc/ghc-9.8-text-upper-bound.patch
282283
++ fromUntil "9.10" "9.12" ./patches/ghc/ghc-9.10-containers-upper-bound.patch
283284
++ fromUntil "9.10" "9.12" ./patches/ghc/ghc-9.10-merge-objects.patch
284285
;
@@ -1123,6 +1124,35 @@ in {
11231124

11241125
ghc-patches = ghc-patches "9.8.2";
11251126
});
1127+
ghc9101 = final.callPackage ../compiler/ghc (traceWarnOld "9.10" {
1128+
extra-passthru = { buildGHC = final.buildPackages.haskell-nix.compiler.ghc9101; };
1129+
1130+
bootPkgs = bootPkgsGhc94 // {
1131+
ghc = if final.stdenv.buildPlatform != final.stdenv.targetPlatform
1132+
then final.buildPackages.buildPackages.haskell-nix.compiler.ghc9101
1133+
else final.buildPackages.buildPackages.haskell.compiler.ghc982
1134+
or final.buildPackages.buildPackages.haskell.compiler.ghc981
1135+
or final.buildPackages.buildPackages.haskell.compiler.ghc965
1136+
or final.buildPackages.buildPackages.haskell.compiler.ghc964
1137+
or final.buildPackages.buildPackages.haskell.compiler.ghc963
1138+
or final.buildPackages.buildPackages.haskell.compiler.ghc962
1139+
or final.buildPackages.buildPackages.haskell.compiler.ghc945
1140+
or final.buildPackages.buildPackages.haskell.compiler.ghc944
1141+
or final.buildPackages.buildPackages.haskell.compiler.ghc943;
1142+
};
1143+
inherit sphinx;
1144+
1145+
buildLlvmPackages = final.buildPackages.llvmPackages_12;
1146+
llvmPackages = final.llvmPackages_12;
1147+
1148+
src-spec = rec {
1149+
version = "9.10.1";
1150+
url = "https://downloads.haskell.org/~ghc/${version}/ghc-${version}-src.tar.xz";
1151+
sha256 = "sha256-vzhqMC1O4FR5H/1RdIkA8V1xdg/RmRV5ItEgzB+J4vc=";
1152+
};
1153+
1154+
ghc-patches = ghc-patches "9.10.1";
1155+
});
11261156
} // (__listToAttrs (final.lib.mapAttrsToList (source-name: ver:
11271157
let
11281158
src = final.haskell-nix.sources.${source-name};
@@ -1136,7 +1166,7 @@ in {
11361166

11371167
bootPkgs = bootPkgsGhc94 // {
11381168
ghc = if final.stdenv.buildPlatform != final.stdenv.targetPlatform
1139-
then final.buildPackages.buildPackages.haskell-nix.compiler.ghc982 # TODO use ${compiler-nix-name}
1169+
then final.buildPackages.buildPackages.haskell-nix.compiler.ghc9101 # TODO use ${compiler-nix-name}
11401170
else final.buildPackages.buildPackages.haskell.compiler.ghc982
11411171
or final.buildPackages.buildPackages.haskell.compiler.ghc981
11421172
or final.buildPackages.buildPackages.haskell.compiler.ghc965

overlays/ghc-packages.nix

-5
Original file line numberDiff line numberDiff line change
@@ -73,11 +73,6 @@ let
7373
iserv = "utils/iserv";
7474
} // final.lib.optionalAttrs ((!final.stdenv.hostPlatform.isGhcjs || builtins.compareVersions ghcVersion "9.6" < 0) && builtins.compareVersions ghcVersion "9.8" < 0) {
7575
libiserv = "libraries/libiserv";
76-
} // final.lib.optionalAttrs (builtins.compareVersions ghcVersion "9.9" > 0) {
77-
Cabal = "libraries/Cabal/Cabal";
78-
Cabal-syntax = "libraries/Cabal/Cabal-syntax";
79-
cabal-install = "libraries/Cabal/cabal-install";
80-
cabal-install-solver = "libraries/Cabal/cabal-install-solver";
8176
} // final.lib.optionalAttrs (!final.stdenv.hostPlatform.isGhcjs) {
8277
ghc = "compiler";
8378
ghc-boot = "libraries/ghc-boot";
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
diff --git a/linters/lint-commit-msg/lint-commit-msg.cabal b/linters/lint-commit-msg/lint-commit-msg.cabal
2+
index 7d1dbd0fcb..861ad6f03d 100644
3+
--- a/linters/lint-commit-msg/lint-commit-msg.cabal
4+
+++ b/linters/lint-commit-msg/lint-commit-msg.cabal
5+
@@ -26,4 +26,4 @@ executable lint-commit-msg
6+
base
7+
>= 4.14 && < 5,
8+
text
9+
- >= 1.2 && < 2.1
10+
+ >= 1.2 && < 2.2
11+
diff --git a/linters/lint-submodule-refs/lint-submodule-refs.cabal b/linters/lint-submodule-refs/lint-submodule-refs.cabal
12+
index ce4012adfc..9ff85d2731 100644
13+
--- a/linters/lint-submodule-refs/lint-submodule-refs.cabal
14+
+++ b/linters/lint-submodule-refs/lint-submodule-refs.cabal
15+
@@ -15,7 +15,7 @@ executable lint-submodule-refs
16+
base
17+
>= 4.14 && < 5,
18+
text
19+
- >= 1.2 && < 2.1,
20+
+ >= 1.2 && < 2.2,
21+
linters-common
22+
23+
ghc-options:
24+
diff --git a/linters/lint-whitespace/lint-whitespace.cabal b/linters/lint-whitespace/lint-whitespace.cabal
25+
index 61e376d1f9..ab49690435 100644
26+
--- a/linters/lint-whitespace/lint-whitespace.cabal
27+
+++ b/linters/lint-whitespace/lint-whitespace.cabal
28+
@@ -28,4 +28,4 @@ executable lint-whitespace
29+
base
30+
>= 4.14 && < 5,
31+
text
32+
- >= 1.2 && < 2.1,
33+
+ >= 1.2 && < 2.2,
34+
diff --git a/linters/linters-common/linters-common.cabal b/linters/linters-common/linters-common.cabal
35+
index 02245750dd..0bdd04a761 100644
36+
--- a/linters/linters-common/linters-common.cabal
37+
+++ b/linters/linters-common/linters-common.cabal
38+
@@ -16,7 +16,7 @@ library
39+
base
40+
>= 4.14 && < 5,
41+
text
42+
- >= 1.2 && < 2.1,
43+
+ >= 1.2 && < 2.2,
44+
deepseq
45+
>= 1.1,
46+

test/haskell-language-server/cabal.nix

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ let
33
project = haskell-nix.cabalProject' {
44
inherit compiler-nix-name evalPackages;
55
name = "haskell-language-server";
6-
src = haskell-nix.sources."hls-2.7";
6+
src = haskell-nix.sources."hls-2.8";
77
configureArgs = "--disable-benchmarks --disable-tests";
88
};
99
in recurseIntoAttrs {

test/plugin/default.nix

+1-1
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ in recurseIntoAttrs {
2121

2222
# Not sure why this breaks for ghc 8.10.7
2323
meta.disabled = compiler-nix-name == "ghc8107"
24-
|| builtins.elem compiler-nix-name [ "ghc910020240430" "ghc91120240504" ]
24+
|| builtins.elem compiler-nix-name [ "ghc9101" "ghc91120240504" ]
2525
|| stdenv.hostPlatform.isMusl
2626
|| stdenv.hostPlatform.isGhcjs
2727
|| stdenv.hostPlatform.isWindows

0 commit comments

Comments
 (0)