Add nixpkgs-2205 and update other nixpkgs pins (#1506)

This commit is contained in:
Hamish Mackenzie 2022-07-17 18:18:19 +12:00 committed by GitHub
parent 41ea384502
commit 4e01f34543
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
19 changed files with 6244 additions and 44 deletions

View File

@ -76,9 +76,8 @@ let
for f in Setup.hs Setup.lhs; do
if [ -f $f ]; then
echo Compiling package $f
ghc $f -threaded '' + (if includeGhcPackage then "-package ghc " else "")
+ ''-package-db ${configFiles}/${configFiles.packageCfgDir} --make -o ./Setup
setup=$(pwd)/Setup
ghc $f -threaded ${if includeGhcPackage then "-package ghc " else ""
}-package-db ${configFiles}/${configFiles.packageCfgDir} --make -o ./Setup
fi
done
[ -f ./Setup ] || (echo Failed to build Setup && exit 1)

14
ci.nix
View File

@ -11,10 +11,17 @@
inherit (pkgs.haskell-nix) sources;
nixpkgsVersions = {
"R2111" = "nixpkgs-2111";
"R2205" = "nixpkgs-2205";
"unstable" = "nixpkgs-unstable";
};
haskellNix = import ./default.nix { inherit checkMaterialization; };
nixpkgsArgs = haskellNix.nixpkgsArgs // {
# Needed for dwarf tests
config = haskellNix.nixpkgsArgs.config // {
permittedInsecurePackages = ["libdwarf-20210528" "libdwarf-20181024" "dwarfdump-20181024"];
};
};
compilerNixNames = nixpkgsName: nixpkgs: builtins.mapAttrs (compiler-nix-name: runTests: {
inherit (import ./default.nix { inherit checkMaterialization; }) nixpkgsArgs;
inherit runTests;
}) (
# GHC version to cache and whether to run the tests against them.
@ -26,6 +33,9 @@
nixpkgs.lib.optionalAttrs (nixpkgsName == "R2111") {
ghc865 = false;
ghc8107 = true;
} // nixpkgs.lib.optionalAttrs (nixpkgsName == "R2205") {
ghc865 = false;
ghc8107 = true;
} // nixpkgs.lib.optionalAttrs (nixpkgsName == "unstable") {
ghc865 = false;
ghc884 = false; # Native version is used to boot 9.0.1
@ -70,7 +80,7 @@ dimension "Nixpkgs version" nixpkgsVersions (nixpkgsName: nixpkgs-pin:
let pinnedNixpkgsSrc = sources.${nixpkgs-pin};
# We need this for generic nixpkgs stuff at the right version
genericPkgs = import pinnedNixpkgsSrc {};
in dimension "GHC version" (compilerNixNames nixpkgsName genericPkgs) (compiler-nix-name: {nixpkgsArgs, runTests}:
in dimension "GHC version" (compilerNixNames nixpkgsName genericPkgs) (compiler-nix-name: {runTests}:
dimension "System" (systems nixpkgsName genericPkgs compiler-nix-name) (systemName: system:
let pkgs = import pinnedNixpkgsSrc (nixpkgsArgs // { inherit system; });
build = import ./build.nix { inherit pkgs ifdLevel compiler-nix-name; };

View File

@ -255,11 +255,11 @@
},
"nixpkgs-2105": {
"locked": {
"lastModified": 1645296114,
"narHash": "sha256-y53N7TyIkXsjMpOG7RhvqJFGDacLs9HlyHeSTBioqYU=",
"lastModified": 1655034179,
"narHash": "sha256-rf1/7AbzuYDw6+8Xvvf3PtEOygymLBrFsFxvext5ZjI=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "530a53dcbc9437363471167a5e4762c5fcfa34a1",
"rev": "046ee4af7a9f016a364f8f78eeaa356ba524ac31",
"type": "github"
},
"original": {
@ -271,11 +271,11 @@
},
"nixpkgs-2111": {
"locked": {
"lastModified": 1648744337,
"narHash": "sha256-bYe1dFJAXovjqiaPKrmAbSBEK5KUkgwVaZcTbSoJ7hg=",
"lastModified": 1656782578,
"narHash": "sha256-1eMCBEqJplPotTo/SZ/t5HU6Sf2I8qKlZi9MX7jv9fw=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "0a58eebd8ec65ffdef2ce9562784123a73922052",
"rev": "573603b7fdb9feb0eb8efc16ee18a015c667ab1b",
"type": "github"
},
"original": {
@ -285,6 +285,22 @@
"type": "github"
}
},
"nixpkgs-2205": {
"locked": {
"lastModified": 1657876628,
"narHash": "sha256-URmf0O2cQ/3heg2DJOeLyU/JmfVMqG4X5t9crQXMaeY=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "549d82bdd40f760a438c3c3497c1c61160f3de55",
"type": "github"
},
"original": {
"owner": "NixOS",
"ref": "nixpkgs-22.05-darwin",
"repo": "nixpkgs",
"type": "github"
}
},
"nixpkgs-regression": {
"locked": {
"lastModified": 1643052045,
@ -302,11 +318,11 @@
},
"nixpkgs-unstable": {
"locked": {
"lastModified": 1648219316,
"narHash": "sha256-Ctij+dOi0ZZIfX5eMhgwugfvB+WZSrvVNAyAuANOsnQ=",
"lastModified": 1657888067,
"narHash": "sha256-GnwJoFBTPfW3+mz7QEeJEEQ9OMHZOiIJ/qDhZxrlKh8=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "30d3d79b7d3607d56546dd2a6b49e156ba0ec634",
"rev": "65fae659e31098ca4ac825a6fef26d890aaf3f4e",
"type": "github"
},
"original": {
@ -352,6 +368,7 @@
"nixpkgs-2003": "nixpkgs-2003",
"nixpkgs-2105": "nixpkgs-2105",
"nixpkgs-2111": "nixpkgs-2111",
"nixpkgs-2205": "nixpkgs-2205",
"nixpkgs-unstable": "nixpkgs-unstable",
"old-ghc-nix": "old-ghc-nix",
"stackage": "stackage"

View File

@ -6,6 +6,7 @@
nixpkgs-2003 = { url = "github:NixOS/nixpkgs/nixpkgs-20.03-darwin"; };
nixpkgs-2105 = { url = "github:NixOS/nixpkgs/nixpkgs-21.05-darwin"; };
nixpkgs-2111 = { url = "github:NixOS/nixpkgs/nixpkgs-21.11-darwin"; };
nixpkgs-2205 = { url = "github:NixOS/nixpkgs/nixpkgs-22.05-darwin"; };
nixpkgs-unstable = { url = "github:NixOS/nixpkgs/nixpkgs-unstable"; };
flake-utils = { url = "github:numtide/flake-utils"; };
hydra.url = "hydra";

View File

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

View File

@ -24,7 +24,7 @@
}: derivation:
let
inherit (derivation) name;
name = derivation.name + pkgs.lib.optionalString (derivation ? version) "-${derivation.version}";
traceIgnoringSha256 = reason: x:
if sha256 != null
@ -38,8 +38,8 @@ let
unchecked =
let
sha256message = "To make ${this} a fixed-output derivation but not materialized, set `${sha256Arg}` to the output of the 'calculateMaterializedSha' script in 'passthru'.";
materializeMessage = "To materialize ${this} entirely, pass a writable path as the `materialized` argument and run the 'updateMaterialized' script in 'passthru'.";
sha256message = "${name}: To make ${this} a fixed-output derivation but not materialized, set `${sha256Arg}` to the output of the 'calculateMaterializedSha' script in 'passthru'.";
materializeMessage = "${name}: To materialize ${this} entirely, pass a writable path as the `materialized` argument and run the 'updateMaterialized' script in 'passthru'.";
in if reasonNotSafe != null
then
# Warn the user if they tried to pin stuff down when it is not safe

View File

@ -1,14 +1,15 @@
pkgs:
with builtins; let
materialized' = ../../materialized + "/spdx-${pkgs.evalPackages.spdx-license-list-data.version}";
spdxJson = pkgs.evalPackages.spdx-license-list-data.json or pkgs.evalPackages.spdx-license-list-data;
materialized' = ../../materialized + "/spdx-${spdxJson.version}";
licensesJSON = fromJSON (replaceStrings
[ "\\u0026" "\\u0027" "\\u003d" ]
[ "&" "'" "=" ]
(readFile "${pkgs.evalPackages.haskell-nix.materialize {
materialized = if pathExists materialized' then materialized' else null;
} (pkgs.evalPackages.runCommand "spdx-json" {} ''
} (pkgs.evalPackages.runCommand "spdx-json" { inherit (spdxJson) version; } ''
mkdir $out
cp ${pkgs.evalPackages.spdx-license-list-data.json or pkgs.evalPackages.spdx-license-list-data}/json/licenses.json $out
cp ${spdxJson}/json/licenses.json $out
'')
}/licenses.json")
);

6155
materialized/spdx-3.17/licenses.json generated Normal file

File diff suppressed because it is too large Load Diff

View File

@ -8,7 +8,8 @@ final: prev:
inherit (pkgs.stdenv) hostPlatform buildPlatform;
inherit (pkgs) stdenv lib writeScriptBin;
# qemu for linux
qemu = pkgs.buildPackages.qemu;
# Using `buildPackages.buildPackages` here fixes `python3Packages.pygobject3` issue.
qemu = pkgs.buildPackages.buildPackages.qemu;
# wine = pkgs.buildPackages.winePackages.minimal;
# inherit (pkgs.windows) mingw_w64_pthreads;

View File

@ -200,7 +200,7 @@ in {
++ fromUntil "8.10.3" "8.10.5" ./patches/ghc/ghc-8.10.3-rts-make-markLiveObject-thread-safe.patch
++ final.lib.optionals final.targetPlatform.isWindows
(fromUntil "8.10.4" "9.3" ./patches/ghc/ghc-8.10-z-drive-fix.patch)
(fromUntil "8.10.4" "9.3" ./patches/ghc/ghc-8.10-z-drive-fix.patch)
++ final.lib.optional (versionAtLeast "8.6.5") ./patches/ghc/ghc-8.10-windows-add-dependent-file.patch
++ fromUntil "8.10.1" "9.0" ./patches/ghc/Cabal-unbreak-GHCJS.patch
++ until "8.10.5" ./patches/ghc/AC_PROG_CC_99.patch
@ -216,6 +216,7 @@ in {
++ fromUntil "8.10" "9.2" ./patches/ghc/ghc-8.10-global-unique-counters-in-rts.patch # backport of https://gitlab.haskell.org/ghc/ghc/-/commit/9a28680d2e23e7b25dd7254a439aea31dfae32d5
++ fromUntil "9.2" "9.3" ./patches/ghc/ghc-9.2-global-unique-counters-in-rts.patch # backport of https://gitlab.haskell.org/ghc/ghc/-/commit/9a28680d2e23e7b25dd7254a439aea31dfae32d5
++ fromUntil "8.10" "9.1" ./patches/ghc/issue-18708.patch # https://gitlab.haskell.org/ghc/ghc/-/merge_requests/6554
# the following is a partial reversal of https://gitlab.haskell.org/ghc/ghc/-/merge_requests/4391, to address haskell.nix#1227
++ final.lib.optional (versionAtLeast "8.10" && versionLessThan "9.0" && final.targetPlatform.isAarch64) ./patches/ghc/mmap-next.patch
++ final.lib.optional (versionAtLeast "8.10" && versionLessThan "9.0" && final.targetPlatform.isAndroid) ./patches/ghc/rts-android-jemalloc-qemu.patch
@ -1067,7 +1068,18 @@ in {
# where a boot compiler is expected.
compiler = builtins.mapAttrs (_: v:
v.overrideAttrs (drv: {
postInstall = (drv.postInstall or "") + installDeps "";
postInstall = (drv.postInstall or "") + installDeps ""
# Check that the compiler works as in some cases we have had issues
# where the executables built by cached versions of this derivation
# fail to run on macOS.
+ ''
cat << EOF > hello.hs
module Main where
main = putStrLn "Compiled App Runs OK"
EOF
$out/bin/ghc hello.hs -threaded --make -o ./hello
./hello
'';
}) // {
useLLVM = false;
isHaskellNixBootCompiler = true;

View File

@ -22,7 +22,7 @@ final: prev:
set -euo pipefail
exe=$1
shift
${final.buildPackages.nodejs-12_x}/bin/node $exe $@
${final.buildPackages.nodejs-18_x}/bin/node $exe $@
'') + "/bin/node-wrapper")];
# Apply the patches that came with `ghcjs`

View File

@ -24,16 +24,13 @@ final: prev:
configureFlags = (drv.configureFlags or []) ++ [ "--enable-static --disable-shared" ];
});
binutils-unwrapped = prev.binutils-unwrapped.overrideAttrs (attrs: {
patches = attrs.patches ++ final.lib.optional (final.stdenv.targetPlatform.isWindows && attrs.version or "" == "2.31.1") (
final.fetchpatch {
name = "plugin-target-handling-patch";
url = "https://sourceware.org/git/?p=binutils-gdb.git;a=patch;h=999d6dff80fab12d22c2a8d91923db6bde7fb3e5";
excludes = ["bfd/ChangeLog"];
sha256 = "0a60w52wrf6qzchsiviprmcblq0q1fv1rbkx4gkk482dmvx4j0l6";
}
);
});
# GHC <9.4 does not work with binutils 2.38 from newer nixpkgs.
# GHC >=9.4 will use clang/llvm instead.
binutils-unwrapped =
if final.stdenv.targetPlatform.isWindows
then (import prev.haskell-nix.sources.nixpkgs-2111 { inherit (prev) system; })
.pkgsCross.mingwW64.buildPackages.binutils-unwrapped
else prev.binutils-unwrapped;
haskell-nix = prev.haskell-nix // ({
defaultModules = prev.haskell-nix.defaultModules ++ [

View File

@ -47,7 +47,7 @@ in recurseIntoAttrs {
optionalString (!stdenv.hostPlatform.isAarch32 && !stdenv.hostPlatform.isAarch64) (''
printf "checking that executable is dynamically linked to system libraries... " >& 2
'' + optionalString stdenv.isLinux ''
ldd $exe | grep libpthread
ldd $exe | grep 'libc\.so'
'' + optionalString stdenv.isDarwin ''
otool -L $exe |grep .dylib
'')) + ''

View File

@ -47,7 +47,7 @@ in recurseIntoAttrs {
optionalString (!stdenv.hostPlatform.isAarch32 && !stdenv.hostPlatform.isAarch64) (''
printf "checking that executable is dynamically linked to system libraries... " >& 2
'' + optionalString stdenv.isLinux ''
ldd $exe | grep libpthread
ldd $exe | grep 'libc\.so'
'' + optionalString stdenv.isDarwin ''
otool -L $exe |grep .dylib
'')) + ''

View File

@ -54,7 +54,7 @@ in recurseIntoAttrs {
optionalString (!stdenv.hostPlatform.isAarch32 && !stdenv.hostPlatform.isAarch64) (''
printf "checking that executable is dynamically linked to system libraries... " >& 2
'' + optionalString stdenv.isLinux ''
ldd $exe | grep libpthread
ldd $exe | grep 'libc\.so'
'' + optionalString stdenv.isDarwin ''
otool -L $exe |grep .dylib
'')) + ''

View File

@ -1,7 +1,12 @@
{ haskellNix ? import ../default.nix { inherit checkMaterialization; }
, pkgs ? import nixpkgs nixpkgsArgs
, nixpkgs ? haskellNix.sources.nixpkgs-unstable
, nixpkgsArgs ? haskellNix.nixpkgsArgs
, nixpkgsArgs ? haskellNix.nixpkgsArgs // {
# Needed for dwarf tests
config = haskellNix.nixpkgsArgs.config // {
permittedInsecurePackages = ["libdwarf-20210528" "libdwarf-20181024" "dwarfdump-20181024"];
};
}
, ifdLevel ? 1000
, compiler-nix-name
, CADerivationsEnabled ? false

View File

@ -36,7 +36,7 @@ in recurseIntoAttrs {
'' else ''
printf "checking that executable is dynamically linked to system libraries... " >& 2
'' + optionalString stdenv.isLinux ''
ldd $exe | grep libpthread
ldd $exe | grep 'libc\.so'
'' + optionalString stdenv.isDarwin ''
otool -L $exe |grep .dylib
'') + ''

View File

@ -51,7 +51,7 @@ in recurseIntoAttrs {
optionalString (!stdenv.hostPlatform.isAarch32 && !stdenv.hostPlatform.isAarch64) (''
printf "checking that executable is dynamically linked to system libraries... " >& 2
'' + optionalString stdenv.isLinux ''
ldd $exe | grep libpthread
ldd $exe | grep 'libc\.so'
'' + optionalString stdenv.isDarwin ''
otool -L $exe |grep .dylib
'')) + ''

View File

@ -46,7 +46,7 @@ in recurseIntoAttrs {
optionalString (!stdenv.hostPlatform.isAarch32 && !stdenv.hostPlatform.isAarch64) (''
printf "checking that executable is dynamically linked to system libraries... " >& 2
'' + optionalString stdenv.isLinux ''
ldd $exe | grep libpthread
ldd $exe | grep 'libc\.so'
'' + optionalString stdenv.isDarwin ''
otool -L $exe |grep .dylib
'')) + ''