on iko/ghcjs-patch-master help sign in
Update nixpkgs pins to include 20.03 (#557)
701c83fMichael Peyton Jones
@@ -25,12 +25,7 @@ in rec {
25 update-stackage = haskell.callPackage ./scripts/update-stackage.nix {};
25 update-stackage = haskell.callPackage ./scripts/update-stackage.nix {};
26 update-pins = haskell.callPackage ./scripts/update-pins.nix {};
26 update-pins = haskell.callPackage ./scripts/update-pins.nix {};
27 update-docs = pkgs.buildPackages.callPackage ./scripts/update-docs.nix {
27 update-docs = pkgs.buildPackages.callPackage ./scripts/update-docs.nix {
28− generatedOptions = import ./scripts/options-doc.nix {
28+ generatedOptions = pkgs.callPackage ./scripts/options-doc.nix { };
29− # nixpkgs 19.09 changes "Option has no description" from an
30− # error into a warning. That is quite helpful when hardly any
31− # of our options are documented, thanks @oxij.
32− pkgs = import (import ./nixpkgs/default.nix).nixpkgs-1909 {};
33− };
34 };
29 };
35 # Because this is going to be used to test caching on hydra, it must not
30 # Because this is going to be used to test caching on hydra, it must not
36 # use the darcs package from the haskell.nix we are testing. For that reason
31 # use the darcs package from the haskell.nix we are testing. For that reason
builder/default.nix+2−3
@@ -39,10 +39,9 @@ let
39
39
40
40
41 hoogleLocal = let
41 hoogleLocal = let
42− # Use the latest default nixpkgs hoogle.nix, as the 19.03 one does not work with cross compilers
43− nixpkgsHoogleLocal = import ((import (import ../nixpkgs).nixpkgs-default {}).path + /pkgs/development/haskell-modules/hoogle.nix);
42+ nixpkgsHoogle = import (pkgs.path + /pkgs/development/haskell-modules/hoogle.nix);
44 in { packages ? [], hoogle ? pkgs.buildPackages.haskell-nix.haskellPackages.hoogle.components.exes.hoogle }:
43 in { packages ? [], hoogle ? pkgs.buildPackages.haskell-nix.haskellPackages.hoogle.components.exes.hoogle }:
45− haskellLib.weakCallPackage pkgs nixpkgsHoogleLocal {
44+ haskellLib.weakCallPackage pkgs nixpkgsHoogle {
46 # For musl we can use haddock from the buildGHC
45 # For musl we can use haddock from the buildGHC
47 ghc = if stdenv.hostPlatform.isLinux && stdenv.targetPlatform.isMusl
46 ghc = if stdenv.hostPlatform.isLinux && stdenv.targetPlatform.isMusl
48 then ghc.buildGHC
47 then ghc.buildGHC
ci.nix+3−3
@@ -8,8 +8,8 @@ let
8 inherit (import ./ci-lib.nix) dimension platformFilterGeneric filterAttrsOnlyRecursive;
8 inherit (import ./ci-lib.nix) dimension platformFilterGeneric filterAttrsOnlyRecursive;
9 inherit (import ./default.nix {}) sources nixpkgsArgs;
9 inherit (import ./default.nix {}) sources nixpkgsArgs;
10 nixpkgsVersions = {
10 nixpkgsVersions = {
11− "R1903" = "nixpkgs-1903";
12 "R1909" = "nixpkgs-1909";
11 "R1909" = "nixpkgs-1909";
12+ "R2003" = "nixpkgs-2003";
13 };
13 };
14 systems = nixpkgs: nixpkgs.lib.filterAttrs (_: v: builtins.elem v supportedSystems) {
14 systems = nixpkgs: nixpkgs.lib.filterAttrs (_: v: builtins.elem v supportedSystems) {
15 # I wanted to take these from 'lib.systems.examples', but apparently there isn't one for linux!
15 # I wanted to take these from 'lib.systems.examples', but apparently there isn't one for linux!
@@ -20,8 +20,8 @@ let
20 # We need to use the actual nixpkgs version we're working with here, since the values
20 # We need to use the actual nixpkgs version we're working with here, since the values
21 # of 'lib.systems.examples' are not understood between all versions
21 # of 'lib.systems.examples' are not understood between all versions
22 let lib = nixpkgs.lib;
22 let lib = nixpkgs.lib;
23− in lib.optionalAttrs (system == "x86_64-linux" || nixpkgsName == "R1903") {
23+ in lib.optionalAttrs (system == "x86_64-linux") {
24− # Windows cross compilation is currently broken on macOS for nixpkgs 19.09 (works on 19.03)
24+ # Windows cross compilation is currently broken on macOS
25 inherit (lib.systems.examples) mingwW64;
25 inherit (lib.systems.examples) mingwW64;
26 } // lib.optionalAttrs (system == "x86_64-linux") {
26 } // lib.optionalAttrs (system == "x86_64-linux") {
27 # Musl cross only works on linux
27 # Musl cross only works on linux
config.nix+3
@@ -6,6 +6,9 @@
6 wine.build = "wine64";
6 wine.build = "wine64";
7 wine.release = "stable";
7 wine.release = "stable";
8
8
9+ # This is marked insecure on 20.03, but many packages still depend on it
10+ permittedInsecurePackages = [ "openssl-1.0.2u" ];
11+
9 # sadly we need to patch GHC a bit.
12 # sadly we need to patch GHC a bit.
10 packageOverrides = ps: with ps; let
13 packageOverrides = ps: with ps; let
11 in rec {
14 in rec {
default.nix+1−1
@@ -1,6 +1,6 @@
1let haskellNix = rec {
1let haskellNix = rec {
2 sources = {
2 sources = {
3− inherit (import ./nixpkgs/default.nix) nixpkgs-1903 nixpkgs-1909 nixpkgs-default;
3+ inherit (import ./nixpkgs/default.nix) nixpkgs-1909 nixpkgs-2003 nixpkgs-default;
4 };
4 };
5
5
6 config = import ./config.nix;
6 config = import ./config.nix;
nixpkgs/default.nix+1−1
@@ -10,7 +10,7 @@ let
10 };
10 };
11in
11in
12{
12{
13+ nixpkgs-2003 = fetch (./. + "/release-20.03.json");
13 nixpkgs-1909 = fetch (./. + "/release-19.09.json");
14 nixpkgs-1909 = fetch (./. + "/release-19.09.json");
14− nixpkgs-1903 = fetch (./. + "/release-19.03.json");
15 nixpkgs-default = fetch (./. + "/github.json");
15 nixpkgs-default = fetch (./. + "/github.json");
16}
16}
nixpkgs/github.json+6−4
@@ -1,7 +1,9 @@
1{
1{
2 "url": "https://github.com/NixOS/nixpkgs",
2 "url": "https://github.com/NixOS/nixpkgs",
3− "rev": "a81842b6994ce710ebad13303fde29438f610e8c",
3+ "rev": "cac363c661817666e43d047addfaa722610d425f",
4− "date": "2020-03-07T09:04:39+01:00",
4+ "date": "2020-03-24T13:44:58+01:00",
5− "sha256": "0ch8mnx4iicsh8j6a2a6sgdshbgn6wxhzgf35pnq72avc9pdf2xi",
5+ "sha256": "0fi8hgddy8qh2jrsa40jw7jxnr5lrhq2ji6a2xbndllivhzc31kf",
6− "fetchSubmodules": false
6+ "fetchSubmodules": false,
7+ "deepClone": false,
8+ "leaveDotGit": false
7}
9}
nixpkgs/release-18.09.jsondeleted−7
@@ -1,7 +0,0 @@
1−{
2− "url": "https://github.com/nixos/nixpkgs",
3− "rev": "68b3bff32da3fadb16d5fdcbca2b4b69f6b97eb6",
4− "date": "2019-07-29T20:46:01-04:00",
5− "sha256": "129w6rk6brdmq0m8l2py5qkpzzzy7zwd1h03cqlbjq2ff6zh49nc",
6− "fetchSubmodules": false
7−}
nixpkgs/release-19.03.jsondeleted−7
@@ -1,7 +0,0 @@
1−{
2− "url": "https://github.com/NixOS/nixpkgs",
3− "rev": "34c7eb7545d155cc5b6f499b23a7cb1c96ab4d59",
4− "date": "2020-02-10T19:09:03-05:00",
5− "sha256": "11z6ajj108fy2q5g8y4higlcaqncrbjm3dnv17pvif6avagw4mcb",
6− "fetchSubmodules": false
7−}
nixpkgs/release-19.09.json+6−4
@@ -1,7 +1,9 @@
1{
1{
2 "url": "https://github.com/NixOS/nixpkgs",
2 "url": "https://github.com/NixOS/nixpkgs",
3− "rev": "a81842b6994ce710ebad13303fde29438f610e8c",
3+ "rev": "9237a09d8edbae9951a67e9a3434a07ef94035b7",
4− "date": "2020-03-07T09:04:39+01:00",
4+ "date": "2020-04-19T11:10:38+05:30",
5− "sha256": "0ch8mnx4iicsh8j6a2a6sgdshbgn6wxhzgf35pnq72avc9pdf2xi",
5+ "sha256": "05bizymljzzd665bpsjbhxamcgzq7bkjjzjfapkl2nicy774ak4x",
6− "fetchSubmodules": false
6+ "fetchSubmodules": false,
7+ "deepClone": false,
8+ "leaveDotGit": false
7}
9}
nixpkgs/release-20.03.jsonnew file+9
@@ -0,0 +1,9 @@
1+{
2+ "url": "https://github.com/NixOS/nixpkgs",
3+ "rev": "cac363c661817666e43d047addfaa722610d425f",
4+ "date": "2020-03-24T13:44:58+01:00",
5+ "sha256": "0fi8hgddy8qh2jrsa40jw7jxnr5lrhq2ji6a2xbndllivhzc31kf",
6+ "fetchSubmodules": false,
7+ "deepClone": false,
8+ "leaveDotGit": false
9+}
overlays/default.nix+1−2
@@ -2,7 +2,6 @@
2 # Hide nixpkgs haskell and haskellPackages from the haskell-nix overlays.
2 # Hide nixpkgs haskell and haskellPackages from the haskell-nix overlays.
3 # This should prevent us inadvertantly depending on them.
3 # This should prevent us inadvertantly depending on them.
4 (_: super: { haskell = {}; haskellPackages = {}; haskell-nix-super = super; })
4 (_: super: { haskell = {}; haskellPackages = {}; haskell-nix-super = super; })
5− (import ./release-19.03.nix)
6 (import ./wine.nix)
5 (import ./wine.nix)
7 #(import ./ghcjs-asterius-triple.nix)
6 #(import ./ghcjs-asterius-triple.nix)
8 #(import ./python.nix)
7 #(import ./python.nix)
@@ -15,4 +14,4 @@
15 (import ./musl.nix)
14 (import ./musl.nix)
16 # Restore nixpkgs haskell and haskellPackages
15 # Restore nixpkgs haskell and haskellPackages
17 (_: super: { inherit (super.haskell-nix-super) haskell haskellPackages; })
16 (_: super: { inherit (super.haskell-nix-super) haskell haskellPackages; })
18−]
17+]
overlays/release-19.03.nixdeleted−64
@@ -1,64 +0,0 @@
1−# bug-fix overlay for nixpkgs:release-19.03
2−self: super: super.lib.optionalAttrs (super.lib.versions.majorMinor super.lib.version == "19.03") {
3− #11420 (unbreak gcc on darwin)
4− binutils-unwrapped = super.binutils-unwrapped.overrideAttrs (old: {
5− buildInputs = old.buildInputs
6− ++ self.lib.optional self.stdenv.isDarwin self.gettext;
7− });
8− #44172 TMPDIR=$NIX_BUILD_TOP is supposed to fix it, but doesn't.
9− nix = super.nix.overrideAttrs (oldAttrs: {
10− TMPDIR="/tmp";
11− preInstallCheck = self.lib.optional self.stdenv.isDarwin ''
12− export TMPDIR=/tmp
13− '';
14− });
15− # Avoid dependency on perl for windows as it fails to build.
16− openssl = if self.stdenv.hostPlatform.isWindows
17− then let static = false; # TODO check that it is ok to assume this (or find a way to detect without instanciating perl)
18− in super.openssl.overrideAttrs (attrs: {
19− # This is the `postInstall` from 19.03 nixpkgs but with the line
20− # substituteInPlace $out/bin/c_rehash --replace ${buildPackages.perl} ${perl}
21− # removed (as including it requires perl to build).
22− # (code is copied here because modifying `attrs.postInstall` would still
23− # introducing the same dependency)
24− postInstall = self.stdenv.lib.optionalString (!static) ''
25− # If we're building dynamic libraries, then don't install static
26− # libraries.
27− if [ -n "$(echo $out/lib/*.so $out/lib/*.dylib $out/lib/*.dll)" ]; then
28− rm "$out/lib/"*.a
29− fi
30−
31− '' +
32− ''
33− mkdir -p $bin
34− mv $out/bin $bin/
35−
36− mkdir $dev
37− mv $out/include $dev/
38−
39− # remove dependency on Perl at runtime
40− rm -r $out/etc/ssl/misc
41−
42− rmdir $out/etc/ssl/{certs,private}
43− '';
44− # Skip this step on windows as it checks for references to buildPackages.perl
45− # and we are keeping them.
46− postFixup = "";
47− })
48− else super.openssl;
49− winePackages = super.winePackages // {
50− minimal = super.winePackages.minimal.overrideAttrs (oldAttrs: {
51− # Needed for CFNotificationCenterAddObserver symbols.
52− buildInputs = oldAttrs.buildInputs ++ self.lib.optional self.stdenv.isDarwin
53− self.buildPackages.darwin.cf-private;
54− # the relevant check in configure.ac will fail under nix as we are not
55− # using the system supplied compiler tools. We will subsequently *not*
56− # pass `-mmacosx-version-min` in the LDFLAGS, and end up with a linked
57− # binary against 10.14 which *does* contain a __DATA,__dyld section and
58− # then horribly fail to run on Mojave.
59− postConfigure = self.lib.optional (self.stdenv.hostPlatform.isDarwin) ''
60− sed -i 's|-nostartfiles -nodefaultlibs|-nostartfiles -nodefaultlibs -mmacosx-version-min=10.7|g' loader/Makefile
61− '';
62− });
63− };
64−}
release.nix+2−2
@@ -15,9 +15,9 @@ in allJobs // {
15 required = genericPkgs.releaseTools.aggregate {
15 required = genericPkgs.releaseTools.aggregate {
16 name = "haskell.nix-required";
16 name = "haskell.nix-required";
17 meta.description = "All jobs required to pass CI";
17 meta.description = "All jobs required to pass CI";
18− # Hercules will require all of these, we just require the 1909 jobs
18+ # Hercules will require all of these, we just require the 20.03 jobs
19 # to avoid stressing Hydra too much
19 # to avoid stressing Hydra too much
20− constituents = lib.collect lib.isDerivation allJobs.R1909.linux.native;
20+ constituents = lib.collect lib.isDerivation allJobs.R2003.linux.native;
21 };
21 };
22 }
22 }
23
23
scripts/update-docs.nix+4−2
@@ -1,11 +1,13 @@
1{ stdenv, writeScript, coreutils, glibc, git, openssh, gnused, mkdocs
1{ stdenv, writeScript, coreutils, glibc, git, openssh, gnused, mkdocs
2−, generatedOptions }:
2+, python3, generatedOptions }:
3
3
4with stdenv.lib;
4with stdenv.lib;
5
5
6let
6let
7 repo = "git@github.com:input-output-hk/haskell.nix.git";
7 repo = "git@github.com:input-output-hk/haskell.nix.git";
8 sshKey = "/run/keys/buildkite-haskell-dot-nix-ssh-private";
8 sshKey = "/run/keys/buildkite-haskell-dot-nix-ssh-private";
9+ # Doesn't work with Python 2 in 20.03, fixed in master in https://github.com/NixOS/nixpkgs/commit/ee17a6a8379ffd791309b13143d76431f2f671df
10+ py3mkdocs = mkdocs.override { python = python3; };
9in
11in
10 # update-docs depends on glibc which doesn't build on darwin
12 # update-docs depends on glibc which doesn't build on darwin
11 meta.addMetaAttrs { platforms = platforms.linux; } (writeScript "update-docs.sh" ''
13 meta.addMetaAttrs { platforms = platforms.linux; } (writeScript "update-docs.sh" ''
@@ -13,7 +15,7 @@ in
13
15
14 set -euo pipefail
16 set -euo pipefail
15
17
16− export PATH="${makeBinPath [ coreutils glibc git openssh gnused mkdocs ]}"
18+ export PATH="${makeBinPath [ coreutils glibc git openssh gnused py3mkdocs ]}"
17
19
18 source ${./git.env}
20 source ${./git.env}
19
21