nix: build using gcc8

Workaround for https://github.com/NixOS/nix/issues/3300.

https://hydra.nixos.org/build/109304568

    running tests
    checking Nixpkgs on i686-linux
    error: stack overflow (possible infinite recursion)
    build time elapsed:  0m0.068s 0m0.029s 0m36.549s 0m6.187s
    builder for '/nix/store/dr5kd28msqmqk3hkz0ayx10dww6s8dn9-nixpkgs-tarball-20.03pre207974.16c665911fb.drv' failed with exit code 1
This commit is contained in:
Daiderd Jordan 2020-01-03 16:13:35 +01:00
parent 0fb7ae83ad
commit 7ac90533a1
No known key found for this signature in database
GPG key ID: D02435D05B810C96
2 changed files with 17 additions and 5 deletions

View file

@ -2,7 +2,7 @@
, storeDir ? "/nix/store" , storeDir ? "/nix/store"
, stateDir ? "/nix/var" , stateDir ? "/nix/var"
, confDir ? "/etc" , confDir ? "/etc"
, boehmgc , aws-sdk-cpp, boehmgc, boost
, stdenv, llvmPackages_6 , stdenv, llvmPackages_6
}: }:
@ -170,7 +170,7 @@ in rec {
# Nix1 has the perl bindings by default, so no need to build the manually. # Nix1 has the perl bindings by default, so no need to build the manually.
includesPerl = true; includesPerl = true;
inherit storeDir stateDir confDir boehmgc; inherit storeDir stateDir confDir stdenv aws-sdk-cpp boehmgc boost;
}; };
nixStable = callPackage common (rec { nixStable = callPackage common (rec {
@ -180,7 +180,7 @@ in rec {
sha256 = "bb6578e9f20eebab6d78469ecc59c450ac54f276e5a86a882015d98fecb1bc7b"; sha256 = "bb6578e9f20eebab6d78469ecc59c450ac54f276e5a86a882015d98fecb1bc7b";
}; };
inherit storeDir stateDir confDir boehmgc; inherit storeDir stateDir confDir stdenv aws-sdk-cpp boehmgc boost;
} // stdenv.lib.optionalAttrs stdenv.cc.isClang { } // stdenv.lib.optionalAttrs stdenv.cc.isClang {
stdenv = llvmPackages_6.stdenv; stdenv = llvmPackages_6.stdenv;
}); });
@ -196,7 +196,7 @@ in rec {
}; };
fromGit = true; fromGit = true;
inherit storeDir stateDir confDir boehmgc; inherit storeDir stateDir confDir stdenv aws-sdk-cpp boehmgc boost;
}); });
nixFlakes = lib.lowPrio (callPackage common rec { nixFlakes = lib.lowPrio (callPackage common rec {
@ -210,7 +210,7 @@ in rec {
}; };
fromGit = true; fromGit = true;
inherit storeDir stateDir confDir boehmgc; inherit storeDir stateDir confDir stdenv aws-sdk-cpp boehmgc boost;
}); });
} }

View file

@ -24762,6 +24762,18 @@ in
storeDir = config.nix.storeDir or "/nix/store"; storeDir = config.nix.storeDir or "/nix/store";
stateDir = config.nix.stateDir or "/nix/var"; stateDir = config.nix.stateDir or "/nix/var";
boehmgc = boehmgc.override { enableLargeConfig = true; }; boehmgc = boehmgc.override { enableLargeConfig = true; };
# Tarball evaluation fails with a gcc9 based nix-env.
# $ nix-build pkgs/top-level/release.nix -A tarball
stdenv = if stdenv.cc.isGNU then gcc8Stdenv else stdenv;
aws-sdk-cpp = aws-sdk-cpp.override {
stdenv = if stdenv.cc.isGNU then gcc8Stdenv else stdenv;
};
boost = boost.override {
buildPackages = buildPackages // {
stdenv = if stdenv.cc.isGNU then gcc8Stdenv else stdenv;
};
stdenv = if stdenv.cc.isGNU then gcc8Stdenv else stdenv;
};
}) })
nix nix
nix1 nix1