summary refs log tree commit diff
path: root/pkgs/desktops/gnome-3/update.nix
blob: b7a6ce16d11f210d088be3926a267b44f62206ae (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
{ 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"
''