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 {
|
2024-01-13 08:15:51 +00:00
|
|
|
version = "0.7.0";
|
2020-04-24 23:36:52 +00:00
|
|
|
pname = "rink";
|
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "tiffany352";
|
|
|
|
repo = "rink-rs";
|
|
|
|
rev = "v${version}";
|
2024-01-13 08:15:51 +00:00
|
|
|
sha256 = "sha256-5UrSJ/y6GxDUNaljal57JJY17NuI+2yLwVTwp+xBNxs=";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
2024-01-13 08:15:51 +00:00
|
|
|
cargoHash = "sha256-G30NcP1ej01ygHzaxZ2OdgfksvXe/SCsmZFwamxlDvA=";
|
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";
|
2024-04-21 15:54:59 +00:00
|
|
|
mainProgram = "rink";
|
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
|
|
|
};
|
|
|
|
}
|