3
0
Fork 0
forked from mirrors/nixpkgs
nixpkgs/pkgs/tools/misc/fend/default.nix

29 lines
685 B
Nix
Raw Normal View History

2020-11-09 01:03:25 +00:00
{ lib, fetchFromGitHub, rustPlatform }:
rustPlatform.buildRustPackage rec {
pname = "fend";
2021-08-06 07:26:30 +01:00
version = "0.1.23";
2020-11-09 01:03:25 +00:00
src = fetchFromGitHub {
owner = "printfn";
repo = pname;
rev = "v${version}";
2021-08-06 07:26:30 +01:00
sha256 = "sha256-2jj5sWnkc8Jl9Hdm9NqtA0icg/4busXTn5bsqW2u8es=";
2020-11-09 01:03:25 +00:00
};
2021-08-06 07:26:30 +01:00
cargoSha256 = "sha256-7+BdljkmaT/09PUIa10rZ5Ox2VRZR40zoauDzVxMjQM=";
2020-11-09 01:03:25 +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 ];
};
}