Skip to content

Commit e1b2d0c

Browse files
Try #1506:
2 parents 2b68ab7 + c7f9443 commit e1b2d0c

File tree

19 files changed

+6239
-44
lines changed

19 files changed

+6239
-44
lines changed

builder/setup-builder.nix

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -76,9 +76,8 @@ let
7676
for f in Setup.hs Setup.lhs; do
7777
if [ -f $f ]; then
7878
echo Compiling package $f
79-
ghc $f -threaded '' + (if includeGhcPackage then "-package ghc " else "")
80-
+ ''-package-db ${configFiles}/${configFiles.packageCfgDir} --make -o ./Setup
81-
setup=$(pwd)/Setup
79+
ghc $f -threaded ${if includeGhcPackage then "-package ghc " else ""
80+
}-package-db ${configFiles}/${configFiles.packageCfgDir} --make -o ./Setup
8281
fi
8382
done
8483
[ -f ./Setup ] || (echo Failed to build Setup && exit 1)

ci.nix

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,10 +11,17 @@
1111
inherit (pkgs.haskell-nix) sources;
1212
nixpkgsVersions = {
1313
"R2111" = "nixpkgs-2111";
14+
"R2205" = "nixpkgs-2205";
1415
"unstable" = "nixpkgs-unstable";
1516
};
17+
haskellNix = import ./default.nix { inherit checkMaterialization; };
18+
nixpkgsArgs = haskellNix.nixpkgsArgs // {
19+
# Needed for dwarf tests
20+
config = haskellNix.nixpkgsArgs.config // {
21+
permittedInsecurePackages = [ "libdwarf-20210528" "dwarfdump-20181024" ];
22+
};
23+
};
1624
compilerNixNames = nixpkgsName: nixpkgs: builtins.mapAttrs (compiler-nix-name: runTests: {
17-
inherit (import ./default.nix { inherit checkMaterialization; }) nixpkgsArgs;
1825
inherit runTests;
1926
}) (
2027
# GHC version to cache and whether to run the tests against them.
@@ -26,6 +33,9 @@
2633
nixpkgs.lib.optionalAttrs (nixpkgsName == "R2111") {
2734
ghc865 = false;
2835
ghc8107 = true;
36+
} // nixpkgs.lib.optionalAttrs (nixpkgsName == "R2205") {
37+
ghc865 = false;
38+
ghc8107 = true;
2939
} // nixpkgs.lib.optionalAttrs (nixpkgsName == "unstable") {
3040
ghc865 = false;
3141
ghc884 = false; # Native version is used to boot 9.0.1
@@ -70,7 +80,7 @@ dimension "Nixpkgs version" nixpkgsVersions (nixpkgsName: nixpkgs-pin:
7080
let pinnedNixpkgsSrc = sources.${nixpkgs-pin};
7181
# We need this for generic nixpkgs stuff at the right version
7282
genericPkgs = import pinnedNixpkgsSrc {};
73-
in dimension "GHC version" (compilerNixNames nixpkgsName genericPkgs) (compiler-nix-name: {nixpkgsArgs, runTests}:
83+
in dimension "GHC version" (compilerNixNames nixpkgsName genericPkgs) (compiler-nix-name: {runTests}:
7484
dimension "System" (systems nixpkgsName genericPkgs compiler-nix-name) (systemName: system:
7585
let pkgs = import pinnedNixpkgsSrc (nixpkgsArgs // { inherit system; });
7686
build = import ./build.nix { inherit pkgs ifdLevel compiler-nix-name; };

flake.lock

Lines changed: 26 additions & 9 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
@@ -6,6 +6,7 @@
66
nixpkgs-2003 = { url = "github:NixOS/nixpkgs/nixpkgs-20.03-darwin"; };
77
nixpkgs-2105 = { url = "github:NixOS/nixpkgs/nixpkgs-21.05-darwin"; };
88
nixpkgs-2111 = { url = "github:NixOS/nixpkgs/nixpkgs-21.11-darwin"; };
9+
nixpkgs-2205 = { url = "github:NixOS/nixpkgs/nixpkgs-22.05-darwin"; };
910
nixpkgs-unstable = { url = "github:NixOS/nixpkgs/nixpkgs-unstable"; };
1011
flake-utils = { url = "github:numtide/flake-utils"; };
1112
hydra.url = "hydra";

lib/ghcjs-project.nix

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -76,9 +76,11 @@ let
7676

7777
# Inputs needed to boot the GHCJS compiler
7878
bootInputs = with pkgs.buildPackages; [
79-
# pin nodejs to the 12 series for now, as strings can only be half the length in node 14+
80-
# see https://github.com/nodejs/node/issues/33960, this can break large TH splices for now.
81-
nodejs-12_x
79+
# We used to pin nodejs to the 12 series, as strings can only be half the length in node 14+
80+
# see https://github.com/nodejs/node/issues/33960
81+
# Large TH splices are likely broken.
82+
# TODO reinstate the pin of find a work around for ghcjs to send TH splice in chunks.
83+
nodejs-18_x
8284
makeWrapper
8385
xorg.lndir
8486
gmp

lib/materialize.nix

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@
2424
}: derivation:
2525

2626
let
27-
inherit (derivation) name;
27+
name = derivation.name + pkgs.lib.optionalString (derivation ? version) "-${derivation.version}";
2828

2929
traceIgnoringSha256 = reason: x:
3030
if sha256 != null
@@ -38,8 +38,8 @@ let
3838

3939
unchecked =
4040
let
41-
sha256message = "To make ${this} a fixed-output derivation but not materialized, set `${sha256Arg}` to the output of the 'calculateMaterializedSha' script in 'passthru'.";
42-
materializeMessage = "To materialize ${this} entirely, pass a writable path as the `materialized` argument and run the 'updateMaterialized' script in 'passthru'.";
41+
sha256message = "${name}: To make ${this} a fixed-output derivation but not materialized, set `${sha256Arg}` to the output of the 'calculateMaterializedSha' script in 'passthru'.";
42+
materializeMessage = "${name}: To materialize ${this} entirely, pass a writable path as the `materialized` argument and run the 'updateMaterialized' script in 'passthru'.";
4343
in if reasonNotSafe != null
4444
then
4545
# Warn the user if they tried to pin stuff down when it is not safe

lib/spdx/licenses.nix

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,15 @@
11
pkgs:
22
with builtins; let
3-
materialized' = ../../materialized + "/spdx-${pkgs.evalPackages.spdx-license-list-data.version}";
3+
spdxJson = pkgs.evalPackages.spdx-license-list-data.json or pkgs.evalPackages.spdx-license-list-data;
4+
materialized' = ../../materialized + "/spdx-${spdxJson.version}";
45
licensesJSON = fromJSON (replaceStrings
56
[ "\\u0026" "\\u0027" "\\u003d" ]
67
[ "&" "'" "=" ]
78
(readFile "${pkgs.evalPackages.haskell-nix.materialize {
89
materialized = if pathExists materialized' then materialized' else null;
9-
} (pkgs.evalPackages.runCommand "spdx-json" {} ''
10+
} (pkgs.evalPackages.runCommand "spdx-json" { inherit (spdxJson) version; } ''
1011
mkdir $out
11-
cp ${pkgs.evalPackages.spdx-license-list-data.json or pkgs.evalPackages.spdx-license-list-data}/json/licenses.json $out
12+
cp ${spdxJson}/json/licenses.json $out
1213
'')
1314
}/licenses.json")
1415
);

0 commit comments

Comments
 (0)