depot/third_party/nixpkgs/pkgs/tools/misc/fend/default.nix
Default email 792b51d22f Project import generated by Copybara.
GitOrigin-RevId: d5f237872975e6fb6f76eef1368b5634ffcd266f
2022-02-20 05:27:41 +00:00

28 lines
685 B
Nix

{ lib, fetchFromGitHub, rustPlatform }:
rustPlatform.buildRustPackage rec {
pname = "fend";
version = "0.1.28";
src = fetchFromGitHub {
owner = "printfn";
repo = pname;
rev = "v${version}";
sha256 = "sha256-1bSbeY0ijPKQ/bO1pD/gJ6AC1KNhUlQ1CP0ApbHKkPI=";
};
cargoSha256 = "sha256-d4Kv3CNDrsnit5ukw6EXdgjirGkeTEBZ0nm97ZQ8TZ0=";
doInstallCheck = true;
installCheckPhase = ''
[[ "$($out/bin/fend "1 km to m")" = "1000 m" ]]
'';
meta = with lib; {
description = "Arbitrary-precision unit-aware calculator";
homepage = "https://github.com/printfn/fend";
license = licenses.mit;
maintainers = with maintainers; [ djanatyn ];
};
}