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