Skip to content

Commit 26576ed

Browse files
committed
Merge remote-tracking branch 'origin/master' into static-nix-tools
2 parents c9acd75 + 351c0e1 commit 26576ed

File tree

19 files changed

+417
-115
lines changed

19 files changed

+417
-115
lines changed

Diff for: build.nix

+1-1
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ in rec {
2828
pkgs.recurseIntoAttrs ({
2929
cabal-latest = tool compiler-nix-name "cabal" ({
3030
inherit evalPackages;
31-
} // pkgs.lib.optionalAttrs (ghcFromTo "9.12" "9.13") {
31+
} // pkgs.lib.optionalAttrs (ghcFromTo "9.13" "9.14") {
3232
cabalProjectLocal = builtins.readFile ./test/cabal.project.local;
3333
});
3434
} // pkgs.lib.optionalAttrs (__compareVersions haskell.compiler.${compiler-nix-name}.version "9.8" < 0) {

Diff for: ci.nix

+1
Original file line numberDiff line numberDiff line change
@@ -73,6 +73,7 @@
7373
ghc98llvm = false;
7474
ghc910 = true;
7575
ghc910llvm = true;
76+
ghc9121 = true;
7677
ghc912X = true;
7778
ghc913 = true;
7879
})));

Diff for: flake.lock

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

Diff for: lazy-inputs/default.nix

+1
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,7 @@ in {
3434
inherit ((callFlake { pkgs = final; src = ./ghc983; }).defaultNix) ghc983;
3535
inherit ((callFlake { pkgs = final; src = ./ghc984; }).defaultNix) ghc984;
3636
inherit ((callFlake { pkgs = final; src = ./ghc9101; }).defaultNix) ghc9101;
37+
inherit ((callFlake { pkgs = final; src = ./ghc9121; }).defaultNix) ghc9121;
3738
inherit ((callFlake { pkgs = final; src = ./ghc912X; }).defaultNix) ghc912X;
3839
inherit ((callFlake { pkgs = final; src = ./ghc913; }).defaultNix) ghc913;
3940
} // prev.haskell-nix.sources;

Diff for: lazy-inputs/ghc9121/flake.lock

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

Diff for: lazy-inputs/ghc9121/flake.nix

+12
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
{
2+
description = "Lazy Input for Haskell.nix";
3+
4+
inputs = {
5+
ghc9121 = {
6+
flake = false;
7+
url = "git+https://github.com/stable-haskell/ghc?ref=ghc-9.12.1-iog&submodules=1";
8+
};
9+
};
10+
11+
outputs = inputs: inputs;
12+
}

Diff for: lazy-inputs/ghc912X/flake.lock

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

Diff for: lazy-inputs/ghc913/flake.lock

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

Diff for: lib/call-cabal-project-to-nix.nix

+16-24
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
{ pkgs, runCommand, cacert, index-state-hashes, haskellLib }:
1+
{ pkgs, cacert, index-state-hashes, haskellLib }:
22
{ name ? src.name or null # optional name for better error messages
33
, src
44
, materialized-dir ? ../materialized
@@ -14,7 +14,6 @@
1414
, cabalProjectFreeze ? null
1515
, caller ? "callCabalProjectToNix" # Name of the calling function for better warning messages
1616
, compilerSelection ? p: p.haskell-nix.compiler
17-
, ghc ? null # Deprecated in favour of `compiler-nix-name`
1817
, ghcOverride ? null # Used when we need to set ghc explicitly during bootstrapping
1918
, configureArgs ? "" # Extra arguments to pass to `cabal v2-configure`.
2019
# `--enable-tests --enable-benchmarks` are included by default.
@@ -74,29 +73,22 @@ let
7473
nix-tools = if args.nix-tools or null != null
7574
then args.nix-tools
7675
else evalPackages.haskell-nix.nix-tools-unchecked;
77-
forName = pkgs.lib.optionalString (name != null) (" for " + name);
76+
7877
nameAndSuffix = suffix: if name == null then suffix else name + "-" + suffix;
7978

8079
ghc' =
8180
if ghcOverride != null
8281
then ghcOverride
8382
else
84-
if ghc != null
85-
then __trace ("WARNING: A `ghc` argument was passed" + forName
86-
+ " this has been deprecated in favour of `compiler-nix-name`. "
87-
+ "Using `ghc` will break cross compilation setups, as haskell.nix cannot "
88-
+ "pick the correct `ghc` package from the respective buildPackages. "
89-
+ "For example, use `compiler-nix-name = \"ghc865\";` for GHC 8.6.5.") ghc
90-
else
91-
# Do note that `pkgs = final.buildPackages` in the `overlays/haskell.nix`
92-
# call to this file. And thus `pkgs` here is the proper `buildPackages`
93-
# set and we do not need, nor should pick the compiler from another level
94-
# of `buildPackages`, lest we want to get confusing errors about the Win32
95-
# package.
96-
#
97-
# > The option `packages.Win32.package.identifier.name' is used but not defined.
98-
#
99-
(compilerSelection pkgs)."${compiler-nix-name}";
83+
# Do note that `pkgs = final.buildPackages` in the `overlays/haskell.nix`
84+
# call to this file. And thus `pkgs` here is the proper `buildPackages`
85+
# set and we do not need, nor should pick the compiler from another level
86+
# of `buildPackages`, lest we want to get confusing errors about the Win32
87+
# package.
88+
#
89+
# > The option `packages.Win32.package.identifier.name' is used but not defined.
90+
#
91+
(compilerSelection pkgs)."${compiler-nix-name}";
10092

10193
in let
10294
ghc = if ghc' ? latestVersion
@@ -519,18 +511,18 @@ let
519511
json_cabal_file=$(mktemp)
520512
cabal2json $fixed_cabal_file > $json_cabal_file
521513
522-
exposed_modules="$(jq -r '.library."exposed-modules"[]|select(type=="array")[]' $json_cabal_file)"
523-
reexported_modules="$(jq -r '.library."reexported-modules"//[]|.[]|select(type=="array")[]' $json_cabal_file)"
514+
exposed_modules="$(jq -r '.library."exposed-modules"//[]|.[]|select(type=="array")[]' $json_cabal_file)"
515+
reexported_modules="$(jq -r '.library."reexported-modules"//[]|.[]|select(type=="array")[]' $json_cabal_file | sed 's/.* as //g')"
524516
525517
# FIXME This is a bandaid. Rather than doing this, conditionals should be interpreted.
526518
${pkgs.lib.optionalString pkgs.stdenv.targetPlatform.isGhcjs ''
527-
exposed_modules+=" $(jq -r '.library."exposed-modules"[]|select(type=="object" and .if.arch == "javascript")|.then[]' $json_cabal_file)"
519+
exposed_modules+=" $(jq -r '.library."exposed-modules"//[]|.[]|select(type=="object" and .if.arch == "javascript")|.then[]' $json_cabal_file)"
528520
''}
529521
${pkgs.lib.optionalString pkgs.stdenv.targetPlatform.isWindows ''
530-
exposed_modules+=" $(jq -r '.library."exposed-modules"[]|select(type=="object" and .if.os == "windows")|.then[]' $json_cabal_file)"
522+
exposed_modules+=" $(jq -r '.library."exposed-modules"//[]|.[]|select(type=="object" and .if.os == "windows")|.then[]' $json_cabal_file)"
531523
''}
532524
${pkgs.lib.optionalString (!pkgs.stdenv.targetPlatform.isWindows) ''
533-
exposed_modules+=" $(jq -r '.library."exposed-modules"[]|select(type=="object" and .if.not.os == "windows")|.then[]' $json_cabal_file)"
525+
exposed_modules+=" $(jq -r '.library."exposed-modules"//[]|.[]|select(type=="object" and .if.not.os == "windows")|.then[]' $json_cabal_file)"
534526
''}
535527
536528
EXPOSED_MODULES_${varname name}="$(tr '\n' ' ' <<< "$exposed_modules $reexported_modules")"

Diff for: materialized/ghc-boot-packages-nix/ghc9101-ghcjs/ghc-toolchain.nix

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

0 commit comments

Comments
 (0)