diff options
author | Shea Levy <shea@shealevy.com> | 2017-03-15 11:00:55 -0400 |
---|---|---|
committer | Shea Levy <shea@shealevy.com> | 2017-03-15 11:00:55 -0400 |
commit | d6c3e744259ad9e364c5f4d9072ce64f950f2dc3 (patch) | |
tree | 28edc864945d29f574ed8e2f46495742b1cc3709 /pkgs/development/go-modules | |
parent | 162845d5b159fbd1c53ec90e82c41464940df55e (diff) |
buildGoModule: share the buildFlagsArray with the parallel subprocesses
Diffstat (limited to 'pkgs/development/go-modules')
-rw-r--r-- | pkgs/development/go-modules/generic/default.nix | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/pkgs/development/go-modules/generic/default.nix b/pkgs/development/go-modules/generic/default.nix index c707592e4ae3..985b4c9b9db1 100644 --- a/pkgs/development/go-modules/generic/default.nix +++ b/pkgs/development/go-modules/generic/default.nix @@ -116,6 +116,7 @@ go.stdenv.mkDerivation ( local d; local cmd; cmd="$1" d="$2" + . $TMPDIR/buildFlagsArray echo "$d" | grep -q "\(/_\|examples\|Godeps\)" && return 0 [ -n "$excludedPackages" ] && echo "$d" | grep -q "$excludedPackages" && return 0 local OUT @@ -143,6 +144,11 @@ go.stdenv.mkDerivation ( fi } + if [ ''${#buildFlagsArray[@]} -ne 0 ]; then + declare -p buildFlagsArray > $TMPDIR/buildFlagsArray + else + touch $TMPDIR/buildFlagsArray + fi export -f buildGoDir # parallel needs to see the function if [ -z "$enableParallelBuilding" ]; then export NIX_BUILD_CORES=1 |