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