mirror of
https://github.com/ilyakooo0/nixpkgs.git
synced 2024-12-24 03:43:53 +03:00
gnome3.updateScript: reuse gnome-update-script
This commit is contained in:
parent
59a94b57f0
commit
30f090ff7b
@ -3,10 +3,14 @@
|
||||
|
||||
let
|
||||
python = python3.withPackages (p: [ p.requests ]);
|
||||
in writeScript "update-${packageName}" ''
|
||||
#!${stdenv.shell}
|
||||
set -o errexit
|
||||
PATH=${lib.makeBinPath [ common-updater-scripts coreutils gnugrep gnused python ]}
|
||||
latest_tag=$(python "${./find-latest-version.py}" "${packageName}" "${versionPolicy}" "stable")
|
||||
update-source-version "${attrPath}" "$latest_tag"
|
||||
''
|
||||
updateScript = writeScript "gnome-update-script" ''
|
||||
#!${stdenv.shell}
|
||||
set -o errexit
|
||||
package_name="$1"
|
||||
attr_path="$2"
|
||||
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…
Reference in New Issue
Block a user