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 '';