Skip to content

Commit

Permalink
nix: build using gcc8
Browse files Browse the repository at this point in the history
Workaround for NixOS/nix#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
  • Loading branch information
LnL7 committed Jan 3, 2020
1 parent 0fb7ae8 commit 7ac9053
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 5 deletions.
10 changes: 5 additions & 5 deletions pkgs/tools/package-management/nix/default.nix
Expand Up @@ -2,7 +2,7 @@
, storeDir ? "/nix/store"
, stateDir ? "/nix/var"
, confDir ? "/etc"
, boehmgc
, aws-sdk-cpp, boehmgc, boost
, stdenv, llvmPackages_6
}:

Expand Down Expand Up @@ -170,7 +170,7 @@ in rec {
# Nix1 has the perl bindings by default, so no need to build the manually.
includesPerl = true;

inherit storeDir stateDir confDir boehmgc;
inherit storeDir stateDir confDir stdenv aws-sdk-cpp boehmgc boost;
};

nixStable = callPackage common (rec {
Expand All @@ -180,7 +180,7 @@ in rec {
sha256 = "bb6578e9f20eebab6d78469ecc59c450ac54f276e5a86a882015d98fecb1bc7b";
};

inherit storeDir stateDir confDir boehmgc;
inherit storeDir stateDir confDir stdenv aws-sdk-cpp boehmgc boost;
} // stdenv.lib.optionalAttrs stdenv.cc.isClang {
stdenv = llvmPackages_6.stdenv;
});
Expand All @@ -196,7 +196,7 @@ in rec {
};
fromGit = true;

inherit storeDir stateDir confDir boehmgc;
inherit storeDir stateDir confDir stdenv aws-sdk-cpp boehmgc boost;
});

nixFlakes = lib.lowPrio (callPackage common rec {
Expand All @@ -210,7 +210,7 @@ in rec {
};
fromGit = true;

inherit storeDir stateDir confDir boehmgc;
inherit storeDir stateDir confDir stdenv aws-sdk-cpp boehmgc boost;
});

}
12 changes: 12 additions & 0 deletions pkgs/top-level/all-packages.nix
Expand Up @@ -24762,6 +24762,18 @@ in
storeDir = config.nix.storeDir or "/nix/store";
stateDir = config.nix.stateDir or "/nix/var";
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
nix1
Expand Down

0 comments on commit 7ac9053

Please sign in to comment.