diff --git a/pkgs/by-name/nu/numbat/package.nix b/pkgs/by-name/nu/numbat/package.nix index bb0424d357e3..da0e75d1a3a6 100644 --- a/pkgs/by-name/nu/numbat/package.nix +++ b/pkgs/by-name/nu/numbat/package.nix @@ -1,30 +1,24 @@ { lib, - stdenv, - testers, fetchFromGitHub, rustPlatform, - darwin, - numbat, tzdata, + versionCheckHook, + nix-update-script, }: rustPlatform.buildRustPackage rec { pname = "numbat"; - version = "1.14.0"; + version = "1.15.0"; src = fetchFromGitHub { owner = "sharkdp"; repo = "numbat"; - rev = "v${version}"; - hash = "sha256-TmzM541S2W5Cy8zHEWKRE2Zj2bSgrM4vbsWw3zbi3LQ="; + tag = "v${version}"; + hash = "sha256-5XsrOAvBrmCG6k7YRwGZZtBP/o1jVVtBBTrwIT5CDX8="; }; - cargoHash = "sha256-exvJJsGIj6KhmMcwhPjXMELvisuUtl17BAO6XEJSJmI="; - - buildInputs = lib.optionals stdenv.hostPlatform.isDarwin [ - darwin.apple_sdk.frameworks.Security - ]; + cargoHash = "sha256-RMON7JThY6Ad1QHQFiNbTb2PUsfviR2t+55k1ZtlOd8="; env.NUMBAT_SYSTEM_MODULE_PATH = "${placeholder "out"}/share/numbat/modules"; @@ -40,11 +34,13 @@ rustPlatform.buildRustPackage rec { export TZDIR=${tzdata}/share/zoneinfo ''; - passthru.tests.version = testers.testVersion { - package = numbat; - }; + nativeInstallCheckInputs = [ versionCheckHook ]; + doInstallCheck = true; + versionCheckProgramArg = [ "--version" ]; - meta = with lib; { + passthru.updateScript = nix-update-script { }; + + meta = { description = "High precision scientific calculator with full support for physical units"; longDescription = '' A statically typed programming language for scientific computations @@ -52,14 +48,14 @@ rustPlatform.buildRustPackage rec { ''; homepage = "https://numbat.dev"; changelog = "https://github.com/sharkdp/numbat/releases/tag/v${version}"; - license = with licenses; [ + license = with lib.licenses; [ asl20 mit ]; - mainProgram = "numbat"; - maintainers = with maintainers; [ + maintainers = with lib.maintainers; [ giomf atemu ]; + mainProgram = "numbat"; }; }