kent: add updateScript
This commit is contained in:
@@ -12,6 +12,9 @@
|
||||
bash,
|
||||
fetchFromGitHub,
|
||||
which,
|
||||
writeShellScript,
|
||||
jq,
|
||||
nix-update,
|
||||
}:
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "kent";
|
||||
@@ -85,6 +88,11 @@ stdenv.mkDerivation rec {
|
||||
runHook postInstall
|
||||
'';
|
||||
|
||||
passthru.updateScript = writeShellScript "update-kent" ''
|
||||
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+')
|
||||
${lib.getExe nix-update} kent --version $latestVersion
|
||||
'';
|
||||
|
||||
meta = {
|
||||
description = "UCSC Genome Bioinformatics Group's suite of biological analysis tools, i.e. the kent utilities";
|
||||
homepage = "http://genome.ucsc.edu";
|
||||
|
||||
Reference in New Issue
Block a user