Unverified Commit bd58b2e3 authored by Atemu's avatar Atemu Committed by GitHub
Browse files

numbat: 1.14.0 -> 1.15.0 (#369982)

parents 4084b7f3 1514589a
Loading
Loading
Loading
Loading
+15 −19
Original line number Diff line number Diff line
{
  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";
  };
}