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-12-01 19:17:13 +01:00
parent 7a9acea944
commit 59a94b57f0
17 changed files with 159 additions and 44 deletions
@@ -1,4 +1,4 @@
{ lib, pkgs, fetchFromGitHub, python3Packages, nix-prefetch-scripts }:
{ stdenv, lib, pkgs, fetchFromGitHub, python3Packages, nix-prefetch-scripts }:
python3Packages.buildPythonApplication rec {
version = "0.6.3";
name = "nix-update-source-${version}";
@@ -28,6 +28,7 @@ python3Packages.buildPythonApplication rec {
overrideSrc = drv: lib.overrideDerivation drv (orig: { inherit src; });
};
updateScript = ''
#!${stdenv.shell}
set -e
echo
cd ${toString ./.}