Skip to content

Commit

Permalink
Try #1121:
Browse files Browse the repository at this point in the history
  • Loading branch information
iohk-bors[bot] committed Jun 9, 2021
2 parents 86f68d9 + d614836 commit 1f02a18
Show file tree
Hide file tree
Showing 60 changed files with 13,186 additions and 47 deletions.
10 changes: 5 additions & 5 deletions .buildkite/pipeline.yml
@@ -1,6 +1,6 @@
steps:
- label: 'Run tests with ghc8104'
command: "./test/tests.sh ghc8104"
- label: 'Run tests with ghc8105'
command: "./test/tests.sh ghc8105"
agents:
system: x86_64-linux

Expand All @@ -14,9 +14,9 @@ steps:
agents:
system: x86_64-linux

- label: 'Check closure size with ghc8104'
- label: 'Check closure size with ghc8105'
command:
- nix-build build.nix -A maintainer-scripts.check-closure-size --argstr compiler-nix-name ghc8104 -o check-closure-size.sh
- nix-build build.nix -A maintainer-scripts.check-closure-size --argstr compiler-nix-name ghc8105 -o check-closure-size.sh
- echo "+++ Closure size (MB)"
- ./check-closure-size.sh
agents:
Expand All @@ -36,5 +36,5 @@ steps:

- label: 'Make sure non store paths like can be used as src'
command:
- nix-build build.nix -A maintainer-scripts.check-path-support --argstr compiler-nix-name ghc884 -o check-path-support.sh
- nix-build build.nix -A maintainer-scripts.check-path-support --argstr compiler-nix-name ghc8105 -o check-path-support.sh
- ./check-path-support.sh
5 changes: 3 additions & 2 deletions builder/default.nix
Expand Up @@ -26,8 +26,9 @@ let
# component builder and for nix-shells.
ghcForComponent = import ./ghc-for-component-wrapper.nix {
inherit lib ghc haskellLib;
inherit (buildPackages) stdenv runCommand makeWrapper;
inherit (buildPackages.xorg) lndir;
inherit (buildPackages) stdenv;
inherit (pkgs.evalPackages) runCommand makeWrapper;
inherit (pkgs.evalPackages.xorg) lndir;
};

# Builds a derivation which contains a ghc package-db of
Expand Down
23 changes: 9 additions & 14 deletions ci.nix
Expand Up @@ -9,7 +9,6 @@
inherit (import ./ci-lib.nix) dimension platformFilterGeneric filterAttrsOnlyRecursive;
sources = import ./nix/sources.nix {};
nixpkgsVersions = {
"R2003" = "nixpkgs-2003";
"R2009" = "nixpkgs-2009";
"unstable" = "nixpkgs-unstable";
};
Expand All @@ -24,15 +23,15 @@
# from here (so that is no longer cached) also remove ./materialized/ghcXXX.
# Update supported-ghc-versions.md to reflect any changes made here.
{
ghc865 = true;
ghc8104 = false; # Just included because the native version is needed at eval time
ghc865 = false;
ghc8105 = false; # Just included because the native version is needed at eval time
} // nixpkgs.lib.optionalAttrs (nixpkgsName == "R2009") {
ghc865 = false;
ghc884 = true;
ghc8104 = true;
ghc8105 = true;
} // nixpkgs.lib.optionalAttrs (nixpkgsName == "unstable") {
ghc865 = false;
ghc8104 = true;
ghc884 = false; # Native version is used to boot 9.0.1
ghc8105 = true;
ghc901 = true;
ghc810420210212 = false;
});
Expand All @@ -45,19 +44,15 @@
# We need to use the actual nixpkgs version we're working with here, since the values
# of 'lib.systems.examples' are not understood between all versions
let lib = nixpkgs.lib;
in lib.optionalAttrs (nixpkgsName == "unstable" && (__elem compiler-nix-name ["ghc865" "ghc884" "ghc8104"])) {
in lib.optionalAttrs (nixpkgsName == "unstable" && (__elem compiler-nix-name ["ghc8105"])) {
inherit (lib.systems.examples) ghcjs;
} // lib.optionalAttrs (system == "x86_64-linux" && (
(nixpkgsName == "R2009" && __elem compiler-nix-name ["ghc8101" "ghc8102" "ghc8103" "ghc8104" "ghc810420210212"])
|| (nixpkgsName == "R2003" && __elem compiler-nix-name ["ghc865"]))) {
} // lib.optionalAttrs (system == "x86_64-linux" &&
nixpkgsName == "unstable" && (__elem compiler-nix-name ["ghc8105"])) {
# Windows cross compilation is currently broken on macOS
inherit (lib.systems.examples) mingwW64;
} // lib.optionalAttrs (system == "x86_64-linux"
&& !(nixpkgsName == "R2003" && compiler-nix-name == "ghc8104")) {
} // lib.optionalAttrs (system == "x86_64-linux" && nixpkgsName == "unstable" && compiler-nix-name == "ghc8105") {
# Musl cross only works on linux
# aarch64 cross only works on linux
# We also skip these for the R2003 was build of ghc8104 (we only need the
# native so ifdLevel 1 includes compiler needed in ifdLevel2 eval)
inherit (lib.systems.examples) musl64 aarch64-multiplatform;
};
isDisabled = d: d.meta.disabled or false;
Expand Down
8 changes: 8 additions & 0 deletions compiler/ghc/default.nix
Expand Up @@ -212,6 +212,14 @@ stdenv.mkDerivation (rec {
enableParallelBuilding = true;
postPatch = "patchShebangs .";

# ghc install on macOS wants to run `xattr -r -c`
# The macOS version fails because it wants python 2.
# The nix version of xattr does not support those args.
# Luckily setting the path to something that does not exist will skip the step.
preBuild = ''
XATTR=$(mktemp -d)/nothing
'';

outputs = [ "out" "doc" "generated" ];

# Make sure we never relax`$PATH` and hooks support for compatibility.
Expand Down
2 changes: 2 additions & 0 deletions lib/ghcjs-project.nix
Expand Up @@ -115,6 +115,8 @@ let
cp ${../overlays/patches/config.sub} ghc/libraries/base/config.sub
cp ${../overlays/patches/config.sub} ghc/libraries/unix/config.sub
sed -i 's/_AC_PROG_CC_C99/AC_PROG_CC_C99/' ghc/aclocal.m4
patchShebangs .
sed -i 's/gcc /cc /g' utils/makePackages.sh
./utils/makePackages.sh copy
Expand Down
43 changes: 43 additions & 0 deletions materialized/ghc-boot-packages-nix/ghc8105/base.nix

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

35 changes: 35 additions & 0 deletions materialized/ghc-boot-packages-nix/ghc8105/bytestring.nix

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

39 changes: 39 additions & 0 deletions materialized/ghc-boot-packages-nix/ghc8105/ghc-boot.nix

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

35 changes: 35 additions & 0 deletions materialized/ghc-boot-packages-nix/ghc8105/ghc-heap.nix

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

43 changes: 43 additions & 0 deletions materialized/ghc-boot-packages-nix/ghc8105/ghc-prim.nix

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

62 changes: 62 additions & 0 deletions materialized/ghc-boot-packages-nix/ghc8105/ghc.nix

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 1f02a18

Please sign in to comment.