mirror of
https://github.com/ilyakooo0/nixpkgs.git
synced 2024-12-29 14:57:28 +03:00
9f6a9ce368
grep was not actually properly included by common-updater-scripts before
0105058698
but I am not sure why would we ever
need to add coreutils to PATH.
17 lines
628 B
Nix
17 lines
628 B
Nix
{ 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 ]
|