mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-12-06 22:03:13 +00:00
9483359887
This way we have the benefit of the usual Nixpkgs style, and gain a slight reduction in amount of code in the updater. Also use callPackage to reduce duplication of the dependencies of the update script and use makeBinPath to make things neater.
11 lines
422 B
Nix
11 lines
422 B
Nix
{ lib, writeScript, coreutils, curl, gnugrep, jq, common-updater-scripts }:
|
|
|
|
writeScript "update-tp_smapi" ''
|
|
PATH=${lib.makeBinPath [ common-updater-scripts coreutils curl gnugrep jq ]}
|
|
|
|
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"
|
|
''
|