depot/third_party/nixpkgs/pkgs/os-specific/linux/tp_smapi/update.nix
Default email 8ac5e011d6 Project import generated by Copybara.
GitOrigin-RevId: 2c3273caa153ee8eb5786bc8141b85b859e7efd7
2020-04-24 19:36:52 -04:00

11 lines
454 B
Nix

{ lib, writeScript, coreutils, curl, gnugrep, jq, common-updater-scripts, runtimeShell }:
writeScript "update-tp_smapi" ''
#!${runtimeShell}
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"
''