From 7ac90533a1afa775e109579788082672a8c35abe Mon Sep 17 00:00:00 2001 From: Daiderd Jordan Date: Fri, 3 Jan 2020 16:13:35 +0100 Subject: [PATCH] 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 --- pkgs/tools/package-management/nix/default.nix | 10 +++++----- pkgs/top-level/all-packages.nix | 12 ++++++++++++ 2 files changed, 17 insertions(+), 5 deletions(-) diff --git a/pkgs/tools/package-management/nix/default.nix b/pkgs/tools/package-management/nix/default.nix index 33ec396e5d2..5cd8bf22cac 100644 --- a/pkgs/tools/package-management/nix/default.nix +++ b/pkgs/tools/package-management/nix/default.nix @@ -2,7 +2,7 @@ , storeDir ? "/nix/store" , stateDir ? "/nix/var" , confDir ? "/etc" -, boehmgc +, aws-sdk-cpp, boehmgc, boost , stdenv, llvmPackages_6 }: @@ -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 { @@ -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; }); @@ -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 { @@ -210,7 +210,7 @@ in rec { }; fromGit = true; - inherit storeDir stateDir confDir boehmgc; + inherit storeDir stateDir confDir stdenv aws-sdk-cpp boehmgc boost; }); } diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index fe832c91028..72a8abc470a 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -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