diff options
Diffstat (limited to 'pkgs/by-name/nu/numbat/package.nix')
-rw-r--r-- | pkgs/by-name/nu/numbat/package.nix | 50 |
1 files changed, 50 insertions, 0 deletions
diff --git a/pkgs/by-name/nu/numbat/package.nix b/pkgs/by-name/nu/numbat/package.nix new file mode 100644 index 00000000000..c658fd59306 --- /dev/null +++ b/pkgs/by-name/nu/numbat/package.nix @@ -0,0 +1,50 @@ +{ lib +, stdenv +, testers +, fetchFromGitHub +, rustPlatform +, darwin +, numbat +}: + +rustPlatform.buildRustPackage rec { + pname = "numbat"; + version = "1.8.0"; + + src = fetchFromGitHub { + owner = "sharkdp"; + repo = "numbat"; + rev = "v${version}"; + hash = "sha256-mwDpdQEIgvdGbcXEtA3TLP1e2yFNRCdcljaOzDEoKjg="; + }; + + cargoHash = "sha256-hGNfB82m2w9wDiPs8PMUExWOBN9ZQ+XVs1v8jhHuVhA="; + + buildInputs = lib.optionals stdenv.isDarwin [ + darwin.apple_sdk.frameworks.Security + ]; + + env.NUMBAT_SYSTEM_MODULE_PATH = "${placeholder "out"}/share/${pname}/modules"; + + postInstall = '' + mkdir -p $out/share/${pname} + cp -r $src/${pname}/modules $out/share/${pname}/ + ''; + + passthru.tests.version = testers.testVersion { + package = numbat; + }; + + meta = with lib; { + description = "High precision scientific calculator with full support for physical units"; + longDescription = '' + A statically typed programming language for scientific computations + with first class support for physical dimensions and units + ''; + homepage = "https://numbat.dev"; + changelog = "https://github.com/sharkdp/numbat/releases/tag/v${version}"; + license = with licenses; [ asl20 mit ]; + mainProgram = "numbat"; + maintainers = with maintainers; [ giomf atemu ]; + }; +} |