From 12cb51ce75b39b2f17004665bd9b2ee2b1de9c7c Mon Sep 17 00:00:00 2001 From: kyehn Date: Wed, 20 May 2026 10:33:57 +0000 Subject: [PATCH] zeekstd: add updateScript --- pkgs/by-name/ze/zeekstd/package.nix | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/pkgs/by-name/ze/zeekstd/package.nix b/pkgs/by-name/ze/zeekstd/package.nix index f249b05ed35b..be0e22e21f29 100644 --- a/pkgs/by-name/ze/zeekstd/package.nix +++ b/pkgs/by-name/ze/zeekstd/package.nix @@ -1,7 +1,10 @@ { fetchFromGitHub, + jq, lib, + nix-update, rustPlatform, + writeShellScript, }: rustPlatform.buildRustPackage (finalAttrs: { pname = "zeekstd"; @@ -16,6 +19,11 @@ rustPlatform.buildRustPackage (finalAttrs: { cargoHash = "sha256-0wqRDhopbSfILABEpjuTLfOuwIH+5jzTVl9av7+7098="; + passthru.updateScript = writeShellScript "update-zeekstd" '' + latestVersion=$(curl ''${GITHUB_TOKEN:+-u ":$GITHUB_TOKEN"} --fail --silent https://api.github.com/repos/rorosen/zeekstd/releases/latest | ${lib.getExe jq} --raw-output .tag_name | sed -E 's/^v([0-9.]+)-cli$/\1/') + ${lib.getExe nix-update} zeekstd --version $latestVersion + ''; + meta = { description = "CLI tool that works with the zstd seekable format"; homepage = "https://github.com/rorosen/zeekstd";