nixpkgs/pkgs/tools/misc/fend/default.nix

29 lines
685 B
Nix
Raw Permalink Normal View History

2020-11-08 20:03:25 -05:00
{ lib, fetchFromGitHub, rustPlatform }:
rustPlatform.buildRustPackage rec {
pname = "fend";
2021-02-16 05:06:29 +00:00
version = "0.1.14";
2020-11-08 20:03:25 -05:00
src = fetchFromGitHub {
owner = "printfn";
repo = pname;
rev = "v${version}";
2021-02-16 05:06:29 +00:00
sha256 = "sha256-zKjYUkkm15YRF0YFJKi2A6twvmHuEyxdWcNs37r2dJg=";
2020-11-08 20:03:25 -05:00
};
cargoSha256 = "sha256-rCJn1dDSwKMmwF7m7n+Lf/7+sLd964r8EU7/VdeD9rI=";
2020-11-08 20:03:25 -05:00
doInstallCheck = true;
installCheckPhase = ''
[[ "$($out/bin/fend "1 km to m")" = "1000 m" ]]
'';
2020-11-08 20:03:25 -05:00
meta = with lib; {
description = "Arbitrary-precision unit-aware calculator";
homepage = "https://github.com/printfn/fend";
license = licenses.mit;
maintainers = with maintainers; [ djanatyn ];
};
}