Unverified Commit 0965ae89 authored by Paul Joubert's avatar Paul Joubert
Browse files

hayagriva: add update script

and other conventions suggested by @JarvisCraft
parent b91eaf9d
Loading
Loading
Loading
Loading
+11 −2
Original line number Diff line number Diff line
@@ -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