diff options
author | Jan Tojnar <jtojnar@gmail.com> | 2018-12-02 01:23:39 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-12-02 01:23:39 +0100 |
commit | 4920f0c0adebf632345d90fe134e1cde265f21f5 (patch) | |
tree | 78942095b7a910e90af6e240ed179442872a23db /doc/stdenv.xml | |
parent | 8a5c9882cbf0e126e83f63a6f16ab8f3d640269b (diff) | |
parent | 30f090ff7b3bc35dc36ae2d47ff96a022af5f25d (diff) |
Merge pull request #50977 from jtojnar/parallel-update.nix
update.nix: Run update scripts in parallel
Diffstat (limited to 'doc/stdenv.xml')
-rw-r--r-- | doc/stdenv.xml | 37 |
1 files changed, 37 insertions, 0 deletions
diff --git a/doc/stdenv.xml b/doc/stdenv.xml index 4c19b2867b5ac..26190debc29bf 100644 --- a/doc/stdenv.xml +++ b/doc/stdenv.xml @@ -671,6 +671,43 @@ passthru = { </para> </listitem> </varlistentry> + <varlistentry> + <term> + <varname>passthru.updateScript</varname> + </term> + <listitem> + <para> + A script to be run by <filename>maintainers/scripts/update.nix</filename> when + the package is matched. It needs to be an executable file, either on the file + system: +<programlisting> +passthru.updateScript = ./update.sh; +</programlisting> + or inside the expression itself: +<programlisting> +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" +''; +</programlisting> + The attribute can also contain a list, a script followed by arguments to be passed to it: +<programlisting> +passthru.updateScript = [ ../../update.sh pname "--requested-release=unstable" ]; +</programlisting> + Note that the update scripts will be run in parallel by default; you should avoid running <command>git commit</command> or any other commands that cannot handle that. + </para> + + <para> + For information about how to run the updates, execute + <cmdsynopsis><command>nix-shell</command> <arg>maintainers/scripts/update.nix</arg></cmdsynopsis>. + </para> + </listitem> + </varlistentry> </variablelist> </section> <section xml:id="sec-stdenv-phases"> |