diff options
author | Jörg Thalheim <joerg@thalheim.io> | 2018-11-19 17:11:05 +0000 |
---|---|---|
committer | Jörg Thalheim <joerg@thalheim.io> | 2018-11-21 17:45:44 +0000 |
commit | 9564927888dc683360a045640c3e38b85a7fa76c (patch) | |
tree | 37b01603b63d1b42d6308790d97a52f60ea9abf3 | |
parent | 26725b4628e41f45f8413ec6e580571f86873f5f (diff) |
buildGoPackage: remove build-time dependency on parallel (and perl)
xargs is as good as parallel for our job fixes #50752
-rw-r--r-- | pkgs/development/go-modules/generic/default.nix | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/pkgs/development/go-modules/generic/default.nix b/pkgs/development/go-modules/generic/default.nix index 0e092473bd523..deebba5cfec82 100644 --- a/pkgs/development/go-modules/generic/default.nix +++ b/pkgs/development/go-modules/generic/default.nix @@ -1,4 +1,4 @@ -{ go, govers, parallel, lib, fetchgit, fetchhg, fetchbzr, rsync +{ go, govers, lib, fetchgit, fetchhg, fetchbzr, rsync , removeReferencesTo, fetchFromGitHub }: { name, buildInputs ? [], nativeBuildInputs ? [], passthru ? {}, preFixup ? "" @@ -78,7 +78,7 @@ go.stdenv.mkDerivation ( (builtins.removeAttrs args [ "goPackageAliases" "disabled" ]) // { inherit name; - nativeBuildInputs = [ removeReferencesTo go parallel ] + nativeBuildInputs = [ removeReferencesTo go ] ++ (lib.optional (!dontRenameImports) govers) ++ nativeBuildInputs; buildInputs = [ go ] ++ buildInputs; @@ -162,11 +162,11 @@ go.stdenv.mkDerivation ( else touch $TMPDIR/buildFlagsArray fi - export -f buildGoDir # parallel needs to see the function + export -f buildGoDir # xargs needs to see the function if [ -z "$enableParallelBuilding" ]; then export NIX_BUILD_CORES=1 fi - getGoDirs "" | parallel -j $NIX_BUILD_CORES buildGoDir install + getGoDirs "" | xargs -n1 -P $NIX_BUILD_CORES bash -c 'buildGoDir install "$@"' -- runHook postBuild ''; @@ -175,7 +175,7 @@ go.stdenv.mkDerivation ( checkPhase = args.checkPhase or '' runHook preCheck - getGoDirs test | parallel -j $NIX_BUILD_CORES buildGoDir test + getGoDirs test | xargs -n1 -P $NIX_BUILD_CORES bash -c 'buildGoDir test "$@"' -- runHook postCheck ''; |