From 59a94b57f07594f4544896dd90c71a948d1ea089 Mon Sep 17 00:00:00 2001 From: Jan Tojnar Date: Fri, 23 Nov 2018 18:03:19 +0100 Subject: 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. --- doc/stdenv.xml | 37 +++++++++++++++++++++++++++++++++++++ 1 file changed, 37 insertions(+) (limited to 'doc/stdenv.xml') diff --git a/doc/stdenv.xml b/doc/stdenv.xml index 208b5e9cf3029..a90a377b3f26c 100644 --- a/doc/stdenv.xml +++ b/doc/stdenv.xml @@ -671,6 +671,43 @@ passthru = { + + + passthru.updateScript + + + + A script to be run by maintainers/scripts/update.nix when + the package is matched. It needs to be an executable file, either on the file + system: + +passthru.updateScript = ./update.sh; + + or inside the expression itself: + +passthru.updateScript = writeScript "update-zoom-us" '' + #!/usr/bin/env nix-shell + #!nix-shell -i bash -p curl pcre common-updater-scripts + + set -eu -o pipefail + + version="$(curl -sI https://zoom.us/client/latest/zoom_x86_64.tar.xz | grep -Fi 'Location:' | pcregrep -o1 '/(([0-9]\.?)+)/')" + update-source-version zoom-us "$version" +''; + + The attribute can also contain a list, a script followed by arguments to be passed to it: + +passthru.updateScript = [ ../../update.sh pname "--requested-release=unstable" ]; + + Note that the update scripts will be run in parallel by default; you should avoid running git commit or any other commands that cannot handle that. + + + + For information about how to run the updates, execute + nix-shell maintainers/scripts/update.nix. + + +
-- cgit 1.4.1