zeekstd: add version check hook

This commit is contained in:
rorosen
2026-05-20 10:12:52 +02:00
parent d9854a2b31
commit 071b465175
+3
View File
@@ -5,6 +5,7 @@
nix-update,
rustPlatform,
writeShellScript,
versionCheckHook,
}:
rustPlatform.buildRustPackage (finalAttrs: {
pname = "zeekstd";
@@ -18,6 +19,8 @@ rustPlatform.buildRustPackage (finalAttrs: {
};
cargoHash = "sha256-PpfNNRh+K61jfWtBYtWSx3cWXZ2v7tS52Ny1T1XSYVw=";
nativeInstallCheckInputs = [ versionCheckHook ];
doInstallCheck = true;
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/')