From ecb4b982dbde16946f2d87e50f4e5e4a40953f2d Mon Sep 17 00:00:00 2001 From: kyehn Date: Sun, 31 Aug 2025 22:38:16 +0800 Subject: [PATCH] kent: add updateScript --- pkgs/by-name/ke/kent/package.nix | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/pkgs/by-name/ke/kent/package.nix b/pkgs/by-name/ke/kent/package.nix index c716287b77e4..7a8861dd4c2e 100644 --- a/pkgs/by-name/ke/kent/package.nix +++ b/pkgs/by-name/ke/kent/package.nix @@ -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";