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 14, 2021
2 parents a9db9bd + 6306aa8 commit 8b6d260
Show file tree
Hide file tree
Showing 133 changed files with 30,205 additions and 286 deletions.
10 changes: 5 additions & 5 deletions .buildkite/pipeline.yml
Original file line number Diff line number Diff line change
@@ -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
4 changes: 2 additions & 2 deletions builder/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,8 @@ 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.buildPackages) stdenv runCommand makeWrapper;
inherit (buildPackages.buildPackages.xorg) lndir;
};

# Builds a derivation which contains a ghc package-db of
Expand Down
23 changes: 9 additions & 14 deletions ci.nix
Original file line number Diff line number Diff line change
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
Original file line number Diff line number Diff line change
Expand Up @@ -350,5 +350,13 @@ stdenv.mkDerivation (rec {
dontStrip = true;
dontPatchELF = true;
noAuditTmpdir = true;
} // lib.optionalAttrs (ghc-version == "8.10.5" && stdenv.buildPlatform.isDarwin) {
# 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 = ''
export XATTR=$(mktemp -d)/nothing
'';
});
in self
4 changes: 2 additions & 2 deletions compiler/ghcjs/ghcjs810-src.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"url": "https://github.com/ghcjs/ghcjs",
"rev": "ecb5954b98cdaeb3d4097401c9c3551e7a6f69ce",
"sha256": "09120brnd8n8psskq9f098n7wrlrbb2h7s703678a4gbl2xfglql",
"rev": "2453b111a20ac99a1b1d4de2c8aaa824be4114f5",
"sha256": "sha256-luapKcU4UUQLgSVh+Locfa/PMe9nZOZI1n9L37nuJdI=",
"fetchSubmodules": true
}
17 changes: 12 additions & 5 deletions lib/ghcjs-project.nix
Original file line number Diff line number Diff line change
Expand Up @@ -111,14 +111,21 @@ let
rm -rf utils/pkg-cache/ghc
cp -r ${ghc.generated} utils/pkg-cache/ghc
cp ${../overlays/patches/config.sub} ghc/libraries/integer-gmp/config.sub
cp ${../overlays/patches/config.sub} ghc/libraries/base/config.sub
cp ${../overlays/patches/config.sub} ghc/libraries/unix/config.sub
for a in integer-gmp base unix; do
cp ${../overlays/patches/config.sub} ghc/libraries/$a/config.sub
cp ${../overlays/patches/config.guess} ghc/libraries/$a/config.guess
chmod +w ghc/libraries/$a/config.*
done
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
for a in integer-gmp base unix; do
cp ${../overlays/patches/config.sub} lib/boot/pkg/$a/config.sub
done
'';
# see https://github.com/ghcjs/ghcjs/issues/751 for the happy upper bound.

Expand All @@ -128,9 +135,9 @@ let
["src" "ghcjsVersion" "ghcVersion" "happy" "alex" "cabal-install"])) args) // {
src = configured-src;
index-state = "2021-03-20T00:00:00Z";
compiler-nix-name = if isGhcjs810 then "ghc8104" else if isGhcjs88 then "ghc884" else "ghc865";
compiler-nix-name = if isGhcjs810 then "ghc8105" else if isGhcjs88 then "ghc884" else "ghc865";
configureArgs = pkgs.lib.optionalString (isGhcjs88 && !isGhcjs810) "--constraint='Cabal >=3.0.2.0 && <3.1'";
materialized = ../materialized + (if isGhcjs810 then "/ghcjs8104" else if isGhcjs88 then "/ghcjs884" else "/ghcjs865");
materialized = ../materialized + (if isGhcjs810 then "/ghcjs8105" else if isGhcjs88 then "/ghcjs884" else "/ghcjs865");
modules = [
{
# we need ghc-boot in here for ghcjs.
Expand Down
Loading

0 comments on commit 8b6d260

Please sign in to comment.