gnome3.updateScript: reuse gnome-update-script
This commit is contained in:
parent
59a94b57f0
commit
30f090ff7b
@ -3,10 +3,14 @@
|
|||||||
|
|
||||||
let
|
let
|
||||||
python = python3.withPackages (p: [ p.requests ]);
|
python = python3.withPackages (p: [ p.requests ]);
|
||||||
in writeScript "update-${packageName}" ''
|
updateScript = writeScript "gnome-update-script" ''
|
||||||
#!${stdenv.shell}
|
#!${stdenv.shell}
|
||||||
set -o errexit
|
set -o errexit
|
||||||
PATH=${lib.makeBinPath [ common-updater-scripts coreutils gnugrep gnused python ]}
|
package_name="$1"
|
||||||
latest_tag=$(python "${./find-latest-version.py}" "${packageName}" "${versionPolicy}" "stable")
|
attr_path="$2"
|
||||||
update-source-version "${attrPath}" "$latest_tag"
|
version_policy="$3"
|
||||||
''
|
PATH=${lib.makeBinPath [ common-updater-scripts coreutils gnugrep gnused python ]}
|
||||||
|
latest_tag=$(python "${./find-latest-version.py}" "$package_name" "$version_policy" "stable")
|
||||||
|
update-source-version "$attr_path" "$latest_tag"
|
||||||
|
'';
|
||||||
|
in [ updateScript packageName attrPath versionPolicy ]
|
||||||
|
Loading…
x
Reference in New Issue
Block a user