package.nix: Unset NIX_EVAL_JOBS if nix-eval-jobs not pinned

This commit is contained in:
Zhaofeng Li 2022-03-07 22:02:04 -08:00
parent e27033119b
commit 514cff68bd

View file

@ -17,6 +17,12 @@ rustPlatform.buildRustPackage rec {
NIX_EVAL_JOBS = lib.optionalString (nix-eval-jobs != null) "${nix-eval-jobs}/bin/nix-eval-jobs"; NIX_EVAL_JOBS = lib.optionalString (nix-eval-jobs != null) "${nix-eval-jobs}/bin/nix-eval-jobs";
preBuild = ''
if [[ -z "$NIX_EVAL_JOBS" ]]; then
unset NIX_EVAL_JOBS
fi
'';
postInstall = lib.optionalString (stdenv.hostPlatform == stdenv.buildPlatform) '' postInstall = lib.optionalString (stdenv.hostPlatform == stdenv.buildPlatform) ''
installShellCompletion --cmd colmena \ installShellCompletion --cmd colmena \
--bash <($out/bin/colmena gen-completions bash) \ --bash <($out/bin/colmena gen-completions bash) \