depot/third_party/nixpkgs/pkgs/applications/science/misc/rink/default.nix
Default email f34ce41345 Project import generated by Copybara.
GitOrigin-RevId: b73c2221a46c13557b1b3be9c2070cc42cf01eb3
2024-07-27 08:49:29 +02:00

39 lines
1 KiB
Nix

{ lib, stdenv, fetchFromGitHub, rustPlatform, openssl, pkg-config, ncurses
, curl, installShellFiles, asciidoctor, libiconv, Security }:
rustPlatform.buildRustPackage rec {
version = "0.8.0";
pname = "rink";
src = fetchFromGitHub {
owner = "tiffany352";
repo = "rink-rs";
rev = "v${version}";
hash = "sha256-2+ZkyWhEnnO/QgCzWscbMr0u5kwdv2HqPLjtiXDfv/o=";
};
cargoHash = "sha256-j1pQfMjDNu57otOBTVBQEZIx80p4/beEUQdUkAJhvso=";
nativeBuildInputs = [ pkg-config installShellFiles asciidoctor ];
buildInputs = [ ncurses ]
++ (if stdenv.isDarwin then [ curl libiconv Security ] else [ openssl ]);
# Some tests fail and/or attempt to use internet servers.
doCheck = false;
postBuild = ''
make man
'';
postInstall = ''
installManPage build/*
'';
meta = with lib; {
description = "Unit-aware calculator";
mainProgram = "rink";
homepage = "https://rinkcalc.app";
license = with licenses; [ mpl20 gpl3Plus ];
maintainers = with maintainers; [ sb0 Br1ght0ne ];
};
}