1
0
Fork 1
mirror of https://github.com/NixOS/nixpkgs.git synced 2024-11-23 22:20:51 +00:00
nixpkgs/pkgs/desktops/gnome-3/update.nix

12 lines
511 B
Nix
Raw Normal View History

2017-12-25 09:46:52 +00:00
{ lib, writeScript, python3, common-updater-scripts, coreutils, gnugrep, gnused }:
{ packageName, attrPath ? packageName, versionPolicy ? "odd-unstable" }:
let
python = python3.withPackages (p: [ p.requests ]);
in writeScript "update-${packageName}" ''
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"
''