update.nix: Run update scripts in parallel

To make updating large attribute sets faster, the update scripts
are now run in parallel.

Please note the following changes in semantics:

- The string passed to updateScript needs to be a path to an executable file.
- The updateScript can also be a list: the tail elements will then be passed
  to the head as command line arguments.
This commit is contained in:
Jan Tojnar
2018-11-23 18:03:19 +01:00
parent 7a9acea944
commit 59a94b57f0
17 changed files with 159 additions and 44 deletions

View File

@@ -1,4 +1,5 @@
{ lib
{ stdenv
, lib
, writeScript
, coreutils
, curl
@@ -11,6 +12,7 @@
}:
writeScript "update-nodejs" ''
#!${stdenv.shell}
PATH=${lib.makeBinPath [ common-updater-scripts coreutils curl gnugrep jq gnupg nix ]}
HOME=`mktemp -d`