From 9564927888dc683360a045640c3e38b85a7fa76c Mon Sep 17 00:00:00 2001 From: Jörg Thalheim Date: Mon, 19 Nov 2018 17:11:05 +0000 Subject: buildGoPackage: remove build-time dependency on parallel (and perl) xargs is as good as parallel for our job fixes #50752 --- pkgs/development/go-modules/generic/default.nix | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'pkgs/development/go-modules') diff --git a/pkgs/development/go-modules/generic/default.nix b/pkgs/development/go-modules/generic/default.nix index 0e092473bd5..deebba5cfec 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 ''; -- cgit 1.4.1