From 0965ae890a2e276e0a9c77d530e675bc769a2edf Mon Sep 17 00:00:00 2001 From: Paul Joubert Date: Mon, 30 Mar 2026 10:16:13 +0200 Subject: [PATCH] hayagriva: add update script and other conventions suggested by @JarvisCraft --- pkgs/by-name/ha/hayagriva/package.nix | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/pkgs/by-name/ha/hayagriva/package.nix b/pkgs/by-name/ha/hayagriva/package.nix index eab9cff39089..ba23f539917f 100644 --- a/pkgs/by-name/ha/hayagriva/package.nix +++ b/pkgs/by-name/ha/hayagriva/package.nix @@ -2,6 +2,8 @@ lib, rustPlatform, fetchCrate, + versionCheckHook, + nix-update-script, }: rustPlatform.buildRustPackage (finalAttrs: { @@ -9,7 +11,8 @@ rustPlatform.buildRustPackage (finalAttrs: { version = "0.9.1"; src = fetchCrate { - inherit (finalAttrs) pname version; + inherit (finalAttrs) version; + pname = "hayagriva"; hash = "sha256-9PGo/TPk5QuiVoa5wUGyHufW/VaxqhinxS+u2JMPZBY="; }; @@ -26,10 +29,16 @@ rustPlatform.buildRustPackage (finalAttrs: { "--skip=csl::tests::test_csl" ]; + doInstallCheck = true; + + nativeInstallCheckInputs = [ versionCheckHook ]; + + passthru.updateScript = nix-update-script { }; + meta = { description = "Work with references: Literature database management, storage, and citation formatting"; homepage = "https://github.com/typst/hayagriva"; - changelog = "https://github.com/typst/hayagriva/releases/tag/v${finalAttrs.version}"; + changelog = "https://github.com/typst/hayagriva/blob/v${finalAttrs.version}/CHANGELOG.md"; license = with lib.licenses; [ asl20 mit