2020-11-09 01:03:25 +00:00
|
|
|
{ lib, fetchFromGitHub, rustPlatform }:
|
|
|
|
|
|
|
|
rustPlatform.buildRustPackage rec {
|
|
|
|
pname = "fend";
|
2021-07-20 03:59:18 +01:00
|
|
|
version = "0.1.21";
|
2020-11-09 01:03:25 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "printfn";
|
|
|
|
repo = pname;
|
|
|
|
rev = "v${version}";
|
2021-07-20 03:59:18 +01:00
|
|
|
sha256 = "sha256-LrHZsnW96+QsXuGxWoGqIEKTE86m3tMnh4fpDPIhd1w=";
|
2020-11-09 01:03:25 +00:00
|
|
|
};
|
|
|
|
|
2021-07-20 03:59:18 +01:00
|
|
|
cargoSha256 = "sha256-GZ4Yt5iQkgupJMTYIbvCPtz19985MFf8IDy3ui0M6DE=";
|
2020-11-09 01:03:25 +00:00
|
|
|
|
2021-02-16 07:46:13 +00:00
|
|
|
doInstallCheck = true;
|
|
|
|
|
|
|
|
installCheckPhase = ''
|
|
|
|
[[ "$($out/bin/fend "1 km to m")" = "1000 m" ]]
|
|
|
|
'';
|
|
|
|
|
2020-11-09 01:03:25 +00:00
|
|
|
meta = with lib; {
|
|
|
|
description = "Arbitrary-precision unit-aware calculator";
|
|
|
|
homepage = "https://github.com/printfn/fend";
|
|
|
|
license = licenses.mit;
|
|
|
|
maintainers = with maintainers; [ djanatyn ];
|
|
|
|
};
|
|
|
|
}
|