blob: f42b67239505ad4fb04d361481f702c41239a186 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
|
{ stdenv, lib, writeScript, python3, common-updater-scripts }:
{ packageName, attrPath ? packageName, versionPolicy ? "odd-unstable" }:
let
python = python3.withPackages (p: [ p.requests ]);
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 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 ]
|