1 { lib, stdenv, fetchFromGitHub, rustPlatform, openssl, pkg-config, ncurses
2 , curl, installShellFiles, asciidoctor, libiconv, Security }:
4 rustPlatform.buildRustPackage rec {
8 src = fetchFromGitHub {
12 hash = "sha256-2+ZkyWhEnnO/QgCzWscbMr0u5kwdv2HqPLjtiXDfv/o=";
15 cargoHash = "sha256-j1pQfMjDNu57otOBTVBQEZIx80p4/beEUQdUkAJhvso=";
17 nativeBuildInputs = [ pkg-config installShellFiles asciidoctor ];
18 buildInputs = [ ncurses ]
19 ++ (if stdenv.hostPlatform.isDarwin then [ curl libiconv Security ] else [ openssl ]);
21 # Some tests fail and/or attempt to use internet servers.
29 installManPage build/*
33 description = "Unit-aware calculator";
35 homepage = "https://rinkcalc.app";
36 license = with licenses; [ mpl20 gpl3Plus ];
37 maintainers = with maintainers; [ sb0 Br1ght0ne ];