Merge pull request #329823 from ExpidusOS/fix/pkgsllvm/elfutils
[NixPkgs.git] / pkgs / by-name / nu / numbat / package.nix
blobf9dcdb5031bdec6cce5a0680bbae021062c4e391
1 { lib
2 , stdenv
3 , testers
4 , fetchFromGitHub
5 , rustPlatform
6 , darwin
7 , numbat
8 }:
10 rustPlatform.buildRustPackage rec {
11   pname = "numbat";
12   version = "1.12.0";
14   src = fetchFromGitHub {
15     owner = "sharkdp";
16     repo = "numbat";
17     rev = "v${version}";
18     hash = "sha256-MYoNziQiyppftLPNM8cqEuNwUA4KCmtotQqDhgyef1E=";
19   };
21   cargoHash = "sha256-t6vxJ0UIQJILCGv4PO5V4/QF5de/wtMQDkb8gPtE70E=";
23   buildInputs = lib.optionals stdenv.isDarwin [
24     darwin.apple_sdk.frameworks.Security
25   ];
27   env.NUMBAT_SYSTEM_MODULE_PATH = "${placeholder "out"}/share/${pname}/modules";
29   postInstall = ''
30     mkdir -p $out/share/${pname}
31     cp -r $src/${pname}/modules $out/share/${pname}/
32   '';
34   passthru.tests.version = testers.testVersion {
35     package = numbat;
36   };
38   meta = with lib; {
39     description = "High precision scientific calculator with full support for physical units";
40     longDescription = ''
41       A statically typed programming language for scientific computations
42       with first class support for physical dimensions and units
43     '';
44     homepage = "https://numbat.dev";
45     changelog = "https://github.com/sharkdp/numbat/releases/tag/v${version}";
46     license = with licenses; [ asl20 mit ];
47     mainProgram = "numbat";
48     maintainers = with maintainers; [ giomf atemu ];
49   };