2021-05-20 23:08:51 +00:00
|
|
|
{ lib, stdenv, fetchFromGitHub, rustPlatform, openssl, pkg-config, ncurses
|
2024-05-15 15:35:15 +00:00
|
|
|
, curl, libiconv, Security }:
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
rustPlatform.buildRustPackage rec {
|
2024-05-15 15:35:15 +00:00
|
|
|
version = "0.8.0";
|
2020-04-24 23:36:52 +00:00
|
|
|
pname = "rink";
|
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "tiffany352";
|
|
|
|
repo = "rink-rs";
|
|
|
|
rev = "v${version}";
|
2024-05-15 15:35:15 +00:00
|
|
|
hash = "sha256-2+ZkyWhEnnO/QgCzWscbMr0u5kwdv2HqPLjtiXDfv/o=";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
2024-05-15 15:35:15 +00:00
|
|
|
cargoHash = "sha256-j1pQfMjDNu57otOBTVBQEZIx80p4/beEUQdUkAJhvso=";
|
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 ]
|
2024-05-15 15:35:15 +00:00
|
|
|
++ (if stdenv.isDarwin then [ curl 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
|
|
|
};
|
|
|
|
}
|