nixpkgs/pkgs/os-specific/linux/tp_smapi/update.nix

12 lines
448 B
Nix
Raw Normal View History

{ stdenv, lib, writeScript, coreutils, curl, gnugrep, jq, common-updater-scripts }:
2016-12-10 04:37:37 +01:00
writeScript "update-tp_smapi" ''
#!${stdenv.shell}
PATH=${lib.makeBinPath [ common-updater-scripts coreutils curl gnugrep jq ]}
2016-12-10 04:37:37 +01:00
tags=`curl -s https://api.github.com/repos/evgeni/tp_smapi/tags`
latest_tag=`echo $tags | jq -r '.[] | .name' | grep -oP "^tp-smapi/\K.*" | sort --version-sort | tail -1`
update-source-version linuxPackages.tp_smapi "$latest_tag"
2016-12-10 04:37:37 +01:00
''