on iko/ghcjs-patch-master help sign in
Add missing pins and test ghc865 and ghc883 (#641)
ff9a01eHamish Mackenzie
@@ -3,14 +3,20 @@
3{ supportedSystems ? [ "x86_64-linux" "x86_64-darwin" ]
3{ supportedSystems ? [ "x86_64-linux" "x86_64-darwin" ]
4, ifdLevel ? 3
4, ifdLevel ? 3
5# Whether or not we are evaluating in restricted mode. This is true in Hydra, but not in Hercules.
5# Whether or not we are evaluating in restricted mode. This is true in Hydra, but not in Hercules.
6−, restrictEval ? false }:
6+, restrictEval ? false
7+, checkMaterialization ? false }:
7−let
8+ let
8 inherit (import ./ci-lib.nix) dimension platformFilterGeneric filterAttrsOnlyRecursive;
9 inherit (import ./ci-lib.nix) dimension platformFilterGeneric filterAttrsOnlyRecursive;
9− inherit (import ./default.nix { checkMaterialization = false; }) sources nixpkgsArgs;
10+ sources = import ./nix/sources.nix {};
10 nixpkgsVersions = {
11 nixpkgsVersions = {
11 "R1909" = "nixpkgs-1909";
12 "R1909" = "nixpkgs-1909";
12 "R2003" = "nixpkgs-2003";
13 "R2003" = "nixpkgs-2003";
13 };
14 };
15+ compilerNixNames = builtins.mapAttrs (defaultCompilerNixName: _:
16+ (import ./default.nix { inherit checkMaterialization defaultCompilerNixName; }).nixpkgsArgs) {
17+ ghc865 = {};
18+ ghc883 = {};
19+ };
14 systems = nixpkgs: nixpkgs.lib.filterAttrs (_: v: builtins.elem v supportedSystems) {
20 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!
21 # I wanted to take these from 'lib.systems.examples', but apparently there isn't one for linux!
16 linux = "x86_64-linux";
22 linux = "x86_64-linux";
@@ -33,54 +39,45 @@ dimension "Nixpkgs version" nixpkgsVersions (nixpkgsName: nixpkgs-pin:
33 let pinnedNixpkgsSrc = sources.${nixpkgs-pin};
39 let pinnedNixpkgsSrc = sources.${nixpkgs-pin};
34 # We need this for generic nixpkgs stuff at the right version
40 # We need this for generic nixpkgs stuff at the right version
35 genericPkgs = import pinnedNixpkgsSrc {};
41 genericPkgs = import pinnedNixpkgsSrc {};
42+ in dimension "GHC version" compilerNixNames (compilerNixName: nixpkgsArgs:
36− in dimension "System" (systems genericPkgs) (systemName: system:
43+ dimension "System" (systems genericPkgs) (systemName: system:
37− let pkgs = import pinnedNixpkgsSrc (nixpkgsArgs // { inherit system; });
38− build = import ./build.nix { inherit pkgs ifdLevel; };
39− platformFilter = platformFilterGeneric pkgs system;
40− compilers = {
41− inherit (pkgs.haskell-nix.compiler) ghc865 ghc883;
42− };
43− in filterAttrsOnlyRecursive (_: v: platformFilter v) {
44− # Native builds
45− # TODO: can we merge this into the general case by picking an appropriate "cross system" to mean native?
46− native = pkgs.recurseIntoAttrs ({
47− inherit (build) tests tools maintainer-scripts maintainer-script-cache;
48− ghc = pkgs.recurseIntoAttrs compilers;
49− } // pkgs.lib.optionalAttrs (ifdLevel >= 1) {
50− iserv-proxy = pkgs.recurseIntoAttrs (
51− pkgs.lib.mapAttrs (ghcName: _:
52− pkgs.ghc-extra-packages."${ghcName}".iserv-proxy.components.exes.iserv-proxy
53− ) compilers);
54− } // pkgs.lib.optionalAttrs (ifdLevel >= 2) {
55− hello = (pkgs.haskell-nix.hackage-package { name = "hello"; version = "1.0.0.2"; }).components.exes.hello;
56− });
57− }
58− //
59− dimension "Cross system" (crossSystems nixpkgsName genericPkgs system) (crossSystemName: crossSystem:
60− # Cross builds
61− let pkgs = import pinnedNixpkgsSrc (nixpkgsArgs // { inherit system crossSystem; });
44+ let pkgs = import pinnedNixpkgsSrc (nixpkgsArgs // { inherit system; });
62 build = import ./build.nix { inherit pkgs ifdLevel; };
45 build = import ./build.nix { inherit pkgs ifdLevel; };
63− in pkgs.recurseIntoAttrs (pkgs.lib.optionalAttrs (ifdLevel >= 1) {
46+ platformFilter = platformFilterGeneric pkgs system;
64− ghc = pkgs.recurseIntoAttrs compilers;
47+ in filterAttrsOnlyRecursive (_: v: platformFilter v) {
65− # TODO: look into making tools work when cross compiling
48+ # Native builds
66− # inherit (build) tools;
49+ # TODO: can we merge this into the general case by picking an appropriate "cross system" to mean native?
67− } // pkgs.lib.optionalAttrs (ifdLevel >= 2) {
50+ native = pkgs.recurseIntoAttrs ({
68− remote-iserv = pkgs.recurseIntoAttrs (
51+ inherit (build) tests tools maintainer-scripts maintainer-script-cache;
69− pkgs.lib.mapAttrs (ghcName: _:
52+ ghc = pkgs.haskell-nix.compiler."${compilerNixName}";
70− pkgs.ghc-extra-packages."${ghcName}".remote-iserv.components.exes.remote-iserv
53+ } // pkgs.lib.optionalAttrs (ifdLevel >= 1) {
71− ) compilers);
72− iserv-proxy = pkgs.recurseIntoAttrs (
73− pkgs.lib.mapAttrs (ghcName: _:
74− pkgs.ghc-extra-packages."${ghcName}".iserv-proxy.components.exes.iserv-proxy
54+ iserv-proxy = pkgs.ghc-extra-packages."${compilerNixName}".iserv-proxy.components.exes.iserv-proxy;
75− ) compilers);
76− } // pkgs.lib.optionalAttrs (ifdLevel >= 3) {
55+ } // pkgs.lib.optionalAttrs (ifdLevel >= 2) {
77− hello = (pkgs.haskell-nix.hackage-package { name = "hello"; version = "1.0.0.2"; }).components.exes.hello;
56+ hello = (pkgs.haskell-nix.hackage-package { name = "hello"; version = "1.0.0.2"; }).components.exes.hello;
57+ });
78 }
58 }
79 //
59 //
60+ dimension "Cross system" (crossSystems nixpkgsName genericPkgs system) (crossSystemName: crossSystem:
61+ # Cross builds
62+ let pkgs = import pinnedNixpkgsSrc (nixpkgsArgs // { inherit system crossSystem; });
63+ build = import ./build.nix { inherit pkgs ifdLevel; };
64+ in pkgs.recurseIntoAttrs (pkgs.lib.optionalAttrs (ifdLevel >= 1) {
65+ # TODO: look into cross compiling ghc itself
66+ # ghc = pkgs.haskell-nix.compiler."${compilerNixName}";
67+ # TODO: look into making tools work when cross compiling
68+ # inherit (build) tools;
69+ } // pkgs.lib.optionalAttrs (ifdLevel >= 2) {
70+ remote-iserv = pkgs.ghc-extra-packages."${compilerNixName}".remote-iserv.components.exes.remote-iserv;
71+ iserv-proxy = pkgs.ghc-extra-packages."${compilerNixName}".iserv-proxy.components.exes.iserv-proxy;
72+ } // pkgs.lib.optionalAttrs (ifdLevel >= 3) {
73+ hello = (pkgs.haskell-nix.hackage-package { name = "hello"; version = "1.0.0.2"; }).components.exes.hello;
74+ }
75+ //
80− # Tests are broken on aarch64 cross https://github.com/input-output-hk/haskell.nix/issues/513
76+ # Tests are broken on aarch64 cross https://github.com/input-output-hk/haskell.nix/issues/513
81− pkgs.lib.optionalAttrs (crossSystemName != "aarch64-multiplatform") {
77+ pkgs.lib.optionalAttrs (crossSystemName != "aarch64-multiplatform") {
82− inherit (build) tests;
78+ inherit (build) tests;
83− })
79+ })
80+ )
84 )
81 )
85 )
82 )
86)
83)
overlays/haskell.nix+6−5
@@ -527,12 +527,12 @@ final: prev: {
527 let filterSupportedGhc = final.lib.filterAttrs (n: _: n == "ghc865" || n == "ghc883");
527 let filterSupportedGhc = final.lib.filterAttrs (n: _: n == "ghc865" || n == "ghc883");
528 in final.recurseIntoAttrs ({
528 in final.recurseIntoAttrs ({
529 # Things that require no IFD to build
529 # Things that require no IFD to build
530− inherit (final.buildPackages.haskell-nix) nix-tools source-pins;
530+ inherit (final.buildPackages.haskell-nix) source-pins;
531 } // final.lib.optionalAttrs (ifdLevel > 0) {
531 } // final.lib.optionalAttrs (ifdLevel > 0) {
532 # Things that require one IFD to build (the inputs should be in level 0)
532 # Things that require one IFD to build (the inputs should be in level 0)
533− alex = final.buildPackages.haskell-nix.bootstrap.packages.alex;
533+ boot-alex = final.buildPackages.haskell-nix.bootstrap.packages.alex;
534− happy = final.buildPackages.haskell-nix.bootstrap.packages.happy;
534+ boot-happy = final.buildPackages.haskell-nix.bootstrap.packages.happy;
535− hscolour = final.buildPackages.haskell-nix.bootstrap.packages.hscolour;
535+ boot-hscolour = final.buildPackages.haskell-nix.bootstrap.packages.hscolour;
536 ghc865 = final.buildPackages.haskell-nix.compiler.ghc865;
536 ghc865 = final.buildPackages.haskell-nix.compiler.ghc865;
537 ghc883 = final.buildPackages.haskell-nix.compiler.ghc883;
537 ghc883 = final.buildPackages.haskell-nix.compiler.ghc883;
538 ghc-boot-packages-nix = final.recurseIntoAttrs
538 ghc-boot-packages-nix = final.recurseIntoAttrs
@@ -542,7 +542,8 @@ final: prev: {
542 (filterSupportedGhc final.ghc-extra-projects));
542 (filterSupportedGhc final.ghc-extra-projects));
543 } // final.lib.optionalAttrs (ifdLevel > 1) {
543 } // final.lib.optionalAttrs (ifdLevel > 1) {
544 # Things that require two levels of IFD to build (inputs should be in level 1)
544 # Things that require two levels of IFD to build (inputs should be in level 1)
545− inherit (final.haskell-nix) nix-tools;
545+ inherit (final.buildPackages.haskell-nix.haskellPackages.hpack.components.exes) hpack;
546+ inherit (final.buildPackages.haskell-nix) cabal-install dotCabal nix-tools alex happy;
546 # These seem to be the only things we use from `ghc-extra-packages`
547 # These seem to be the only things we use from `ghc-extra-packages`
547 # in haskell.nix itfinal.
548 # in haskell.nix itfinal.
548 iserv-proxy = final.recurseIntoAttrs
549 iserv-proxy = final.recurseIntoAttrs
release.nix+1−1
@@ -17,7 +17,7 @@ in allJobs // {
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 20.03 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.R2003.linux.native;
20+ constituents = lib.collect lib.isDerivation allJobs.R2003.ghc865.linux.native;
21 };
21 };
22 }
22 }
23
23
test/buildable/default.nix+1−1
@@ -4,7 +4,7 @@ with stdenv.lib;
4
4
5let
5let
6 project = cabalProject' {
6 project = cabalProject' {
7− index-state = "2019-04-30T00:00:00Z";
7+ index-state = "2020-05-25T00:00:00Z";
8 src = testSrc "buildable";
8 src = testSrc "buildable";
9 modules = [ { packages.buildable-test.flags.exclude-broken = true; } ];
9 modules = [ { packages.buildable-test.flags.exclude-broken = true; } ];
10 };
10 };
test/cabal-source-repo/default.nix+1−1
@@ -4,7 +4,7 @@ with stdenv.lib;
4
4
5let
5let
6 project = cabalProject' {
6 project = cabalProject' {
7− index-state = "2019-04-30T00:00:00Z";
7+ index-state = "2020-05-25T00:00:00Z";
8 src = testSrc "cabal-source-repo";
8 src = testSrc "cabal-source-repo";
9 };
9 };
10 packages = project.hsPkgs;
10 packages = project.hsPkgs;
test/call-cabal-project-to-nix/default.nix+1−1
@@ -6,7 +6,7 @@ let
6 # This test could use cabalProject', but it does so that it
6 # This test could use cabalProject', but it does so that it
7 # tests using callCabalProjectToNix and importAndFilterProject
7 # tests using callCabalProjectToNix and importAndFilterProject
8 plan = (importAndFilterProject (callCabalProjectToNix {
8 plan = (importAndFilterProject (callCabalProjectToNix {
9− index-state = "2019-04-30T00:00:00Z";
9+ index-state = "2020-05-25T00:00:00Z";
10 # reuse the cabal-simple test project
10 # reuse the cabal-simple test project
11 src = testSrc "cabal-simple";
11 src = testSrc "cabal-simple";
12 }));
12 }));
test/ghc-options/cabal.nix+1−1
@@ -4,7 +4,7 @@ with stdenv.lib;
4
4
5let
5let
6 project = cabalProject' {
6 project = cabalProject' {
7− index-state = "2019-04-30T00:00:00Z";
7+ index-state = "2020-05-25T00:00:00Z";
8 src = testSrc "ghc-options";
8 src = testSrc "ghc-options";
9 # TODO find a way to get the ghc-options into plan.json so we can use it in plan-to-nix
9 # TODO find a way to get the ghc-options into plan.json so we can use it in plan-to-nix
10 modules = [ { packages.test-ghc-options.package.ghcOptions = "-DTEST_GHC_OPTION"; } ];
10 modules = [ { packages.test-ghc-options.package.ghcOptions = "-DTEST_GHC_OPTION"; } ];
test/lookup-sha256/default.nix+1−1
@@ -2,7 +2,7 @@
2 (haskell-nix.hackage-package {
2 (haskell-nix.hackage-package {
3 name = "pandoc";
3 name = "pandoc";
4 version = "2.9.2.1";
4 version = "2.9.2.1";
5− index-state = "2020-04-15T00:00:00Z";
5+ index-state = "2020-05-25T00:00:00Z";
6 # Function that returns a sha256 string by looking up the location
6 # Function that returns a sha256 string by looking up the location
7 # and tag in a nested attrset
7 # and tag in a nested attrset
8 lookupSha256 = { location, tag, ... }:
8 lookupSha256 = { location, tag, ... }:
test/project-flags/cabal.nix+1−1
@@ -4,7 +4,7 @@ with stdenv.lib;
4
4
5let
5let
6 project = cabalProject' {
6 project = cabalProject' {
7− index-state = "2019-04-30T00:00:00Z";
7+ index-state = "2020-05-25T00:00:00Z";
8 src = testSrc "project-flags";
8 src = testSrc "project-flags";
9 };
9 };
10 packages = project.hsPkgs;
10 packages = project.hsPkgs;
test/setup-deps/cabal.project+1−1
@@ -1,3 +1,3 @@
1−index-state: 2019-10-01T00:00:00Z
1+index-state: 2020-05-25T00:00:00Z
2
2
3packages: pkg
3packages: pkg
test/shell-for-setup-deps/cabal.project+1−1
@@ -1,3 +1,3 @@
1−index-state: 2019-10-01T00:00:00Z
1+index-state: 2020-05-25T00:00:00Z
2
2
3packages: pkg
3packages: pkg