2021-05-20 23:08:51 +00:00
|
|
|
{ lib, stdenv, fetchFromGitHub, rustPlatform, openssl, pkg-config, ncurses
|
|
|
|
, libiconv, Security }:
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
rustPlatform.buildRustPackage rec {
|
2021-05-03 20:48:10 +00:00
|
|
|
version = "0.6.1";
|
2020-04-24 23:36:52 +00:00
|
|
|
pname = "rink";
|
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "tiffany352";
|
|
|
|
repo = "rink-rs";
|
|
|
|
rev = "v${version}";
|
2021-05-03 20:48:10 +00:00
|
|
|
sha256 = "1h93xlavcjvx588q8wkpbzph88yjjhhvzcfxr5nicdca0jnha5ch";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
2021-05-03 20:48:10 +00:00
|
|
|
cargoSha256 = "0x4rvfnw3gl2aj6i006nkk3y1f8skyv8g0ss3z2v6qj9nhs7pyir";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2020-07-18 16:06:22 +00:00
|
|
|
nativeBuildInputs = [ pkg-config ];
|
2021-05-20 23:08:51 +00:00
|
|
|
buildInputs = [ ncurses ]
|
|
|
|
++ (if stdenv.isDarwin then [ libiconv Security ] else [ openssl ]);
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
# Some tests fail and/or attempt to use internet servers.
|
|
|
|
doCheck = false;
|
|
|
|
|
2021-01-15 22:18:51 +00:00
|
|
|
meta = with lib; {
|
2020-04-24 23:36:52 +00:00
|
|
|
description = "Unit-aware calculator";
|
2020-07-18 16:06:22 +00:00
|
|
|
homepage = "https://rinkcalc.app";
|
2021-04-12 18:23:04 +00:00
|
|
|
license = with licenses; [ mpl20 gpl3Plus ];
|
2020-11-19 00:13:47 +00:00
|
|
|
maintainers = with maintainers; [ sb0 Br1ght0ne ];
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
}
|