lol

kent: add updateScript

kyehn ecb4b982 8c5f8032

+8
+8
pkgs/by-name/ke/kent/package.nix
··· 12 bash, 13 fetchFromGitHub, 14 which, 15 }: 16 stdenv.mkDerivation rec { 17 pname = "kent"; ··· 83 cp -r $HOME/inc/* $out/inc/ 84 85 runHook postInstall 86 ''; 87 88 meta = {
··· 12 bash, 13 fetchFromGitHub, 14 which, 15 + writeShellScript, 16 + jq, 17 + nix-update, 18 }: 19 stdenv.mkDerivation rec { 20 pname = "kent"; ··· 86 cp -r $HOME/inc/* $out/inc/ 87 88 runHook postInstall 89 + ''; 90 + 91 + passthru.updateScript = writeShellScript "update-kent" '' 92 + latestVersion=$(curl ''${GITHUB_TOKEN:+-u ":$GITHUB_TOKEN"} --fail --silent https://api.github.com/repos/ucscGenomeBrowser/kent/releases/latest | ${lib.getExe jq} --raw-output .tag_name | grep -oP '(?<=v)\d+') 93 + ${lib.getExe nix-update} kent --version $latestVersion 94 ''; 95 96 meta = {