Skip to content

Commit 15fc6b3

Browse files
Add ghc 8.10.1 (#541)
* ghc 8.10 * Adds/Updates/Removes materialization files * Disable one-shot-kqueue-on-macos patch on ghc-8.10 * Test ghc883 and ghc8101 but only with nix 20.03 * Various smaller fixes. This should fix the infinite recursion issue with #654 Co-authored-by: Lennart Spitzner <[email protected]>
1 parent 2f81e72 commit 15fc6b3

File tree

103 files changed

+15764
-135
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

103 files changed

+15764
-135
lines changed

ci.nix

Lines changed: 20 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -12,21 +12,23 @@
1212
"R1909" = "nixpkgs-1909";
1313
"R2003" = "nixpkgs-2003";
1414
};
15-
compilerNixNames = builtins.mapAttrs (defaultCompilerNixName: _:
16-
(import ./default.nix { inherit checkMaterialization defaultCompilerNixName; }).nixpkgsArgs) {
15+
compilerNixNames = nixpkgsName: nixpkgs: builtins.mapAttrs (defaultCompilerNixName: _:
16+
(import ./default.nix { inherit checkMaterialization defaultCompilerNixName; }).nixpkgsArgs) ({
1717
ghc865 = {};
18+
} // nixpkgs.lib.optionalAttrs (nixpkgsName == "R2003") {
1819
ghc883 = {};
19-
};
20+
ghc8101 = {};
21+
});
2022
systems = nixpkgs: nixpkgs.lib.filterAttrs (_: v: builtins.elem v supportedSystems) {
2123
# I wanted to take these from 'lib.systems.examples', but apparently there isn't one for linux!
2224
linux = "x86_64-linux";
2325
darwin = "x86_64-darwin";
2426
};
25-
crossSystems = nixpkgsName: nixpkgs: system:
27+
crossSystems = nixpkgsName: nixpkgs: compilerNixName: system:
2628
# We need to use the actual nixpkgs version we're working with here, since the values
2729
# of 'lib.systems.examples' are not understood between all versions
2830
let lib = nixpkgs.lib;
29-
in lib.optionalAttrs (system == "x86_64-linux") {
31+
in lib.optionalAttrs (system == "x86_64-linux" && compilerNixName != "ghc8101") {
3032
# Windows cross compilation is currently broken on macOS
3133
inherit (lib.systems.examples) mingwW64;
3234
} // lib.optionalAttrs (system == "x86_64-linux") {
@@ -39,7 +41,7 @@ dimension "Nixpkgs version" nixpkgsVersions (nixpkgsName: nixpkgs-pin:
3941
let pinnedNixpkgsSrc = sources.${nixpkgs-pin};
4042
# We need this for generic nixpkgs stuff at the right version
4143
genericPkgs = import pinnedNixpkgsSrc {};
42-
in dimension "GHC version" compilerNixNames (compilerNixName: nixpkgsArgs:
44+
in dimension "GHC version" (compilerNixNames nixpkgsName genericPkgs) (compilerNixName: nixpkgsArgs:
4345
dimension "System" (systems genericPkgs) (systemName: system:
4446
let pkgs = import pinnedNixpkgsSrc (nixpkgsArgs // { inherit system; });
4547
build = import ./build.nix { inherit pkgs ifdLevel; };
@@ -49,33 +51,37 @@ dimension "Nixpkgs version" nixpkgsVersions (nixpkgsName: nixpkgs-pin:
4951
# TODO: can we merge this into the general case by picking an appropriate "cross system" to mean native?
5052
native = pkgs.recurseIntoAttrs ({
5153
inherit (build) tests tools maintainer-scripts maintainer-script-cache;
52-
ghc = pkgs.haskell-nix.compiler."${compilerNixName}";
54+
ghc = pkgs.buildPackages.haskell-nix.compiler."${compilerNixName}";
5355
} // pkgs.lib.optionalAttrs (ifdLevel >= 1) {
5456
iserv-proxy = pkgs.ghc-extra-packages."${compilerNixName}".iserv-proxy.components.exes.iserv-proxy;
55-
} // pkgs.lib.optionalAttrs (ifdLevel >= 2) {
57+
} // pkgs.lib.optionalAttrs (ifdLevel >= 3) {
5658
hello = (pkgs.haskell-nix.hackage-package { name = "hello"; version = "1.0.0.2"; }).components.exes.hello;
5759
});
5860
}
5961
//
60-
dimension "Cross system" (crossSystems nixpkgsName genericPkgs system) (crossSystemName: crossSystem:
62+
dimension "Cross system" (crossSystems nixpkgsName genericPkgs compilerNixName system) (crossSystemName: crossSystem:
6163
# Cross builds
6264
let pkgs = import pinnedNixpkgsSrc (nixpkgsArgs // { inherit system crossSystem; });
6365
build = import ./build.nix { inherit pkgs ifdLevel; };
6466
in pkgs.recurseIntoAttrs (pkgs.lib.optionalAttrs (ifdLevel >= 1) {
67+
ghc = pkgs.buildPackages.haskell-nix.compiler."${compilerNixName}";
6568
# TODO: look into cross compiling ghc itself
6669
# ghc = pkgs.haskell-nix.compiler."${compilerNixName}";
6770
# TODO: look into making tools work when cross compiling
6871
# inherit (build) tools;
72+
# Tests are broken on aarch64 cross https://github.com/input-output-hk/haskell.nix/issues/513
73+
tests =
74+
if (crossSystemName != "aarch64-multiplatform")
75+
then build.tests
76+
else pkgs.recurseIntoAttrs {
77+
# Even on aarch64 we still want to build the pinned files
78+
inherit (build.tests) haskellNixRoots;
79+
};
6980
} // pkgs.lib.optionalAttrs (ifdLevel >= 2) {
7081
remote-iserv = pkgs.ghc-extra-packages."${compilerNixName}".remote-iserv.components.exes.remote-iserv;
7182
iserv-proxy = pkgs.ghc-extra-packages."${compilerNixName}".iserv-proxy.components.exes.iserv-proxy;
7283
} // pkgs.lib.optionalAttrs (ifdLevel >= 3) {
7384
hello = (pkgs.haskell-nix.hackage-package { name = "hello"; version = "1.0.0.2"; }).components.exes.hello;
74-
}
75-
//
76-
# Tests are broken on aarch64 cross https://github.com/input-output-hk/haskell.nix/issues/513
77-
pkgs.lib.optionalAttrs (crossSystemName != "aarch64-multiplatform") {
78-
inherit (build) tests;
7985
})
8086
)
8187
)

lib/call-cabal-project-to-nix.nix

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -147,7 +147,7 @@ let
147147
fetchRepo = repo:
148148
let sha256 = repo."--sha256" or (lookupSha256 repo);
149149
in (if sha256 != null
150-
then pkgs.fetchgit {
150+
then pkgs.evalPackages.fetchgit {
151151
url = repo.location;
152152
rev = repo.tag;
153153
inherit sha256;

lib/default.nix

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,8 @@
44
with haskellLib;
55

66
let
7-
# Why `final.evalPackages.buildPackages.git`?
8-
# Why not just final.evalPackages.git?
7+
# Why `final.evalPackages.buildPackages.gitMinimal`?
8+
# Why not just final.evalPackages.gitMinimal?
99
#
1010
# A problem arises when `evalPackages` is `buildPackages`.i
1111
# As may be the case in a flake.
@@ -24,7 +24,7 @@ let
2424
# * When `gdb` does not exist for `js`, so when cross
2525
# compiling with ghcjs `final.buildPackages.git` fails
2626
# to build at all.
27-
inherit (pkgs.evalPackages.buildPackages) git;
27+
inherit (pkgs.evalPackages.buildPackages) gitMinimal;
2828

2929
in {
3030
# Within the package components, these are the attribute names of
@@ -204,7 +204,8 @@ in {
204204

205205
# Clean git directory based on `git ls-files --recurse-submodules`
206206
cleanGit = import ./clean-git.nix {
207-
inherit lib git cleanSourceWith;
207+
inherit lib cleanSourceWith;
208+
git = gitMinimal;
208209
inherit (pkgs.evalPackages) runCommand;
209210
};
210211

materialized/bootstrap/ghc844/hscolour/default.nix

Lines changed: 1 addition & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

materialized/bootstrap/ghc882/alex/.plan.nix/alex.nix

Lines changed: 160 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

materialized/bootstrap/ghc882/alex/default.nix

Lines changed: 49 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)