depot/third_party/nixpkgs/pkgs/tools/misc/fend/default.nix
Default email 841d9c7fc1 Project import generated by Copybara.
GitOrigin-RevId: 3a8d7958a610cd3fec3a6f424480f91a1b259185
2021-06-29 00:13:55 +01:00

28 lines
685 B
Nix

{ lib, fetchFromGitHub, rustPlatform }:
rustPlatform.buildRustPackage rec {
pname = "fend";
version = "0.1.17";
src = fetchFromGitHub {
owner = "printfn";
repo = pname;
rev = "v${version}";
sha256 = "sha256-Xq2UjeZiKy9BjNQ9xnC7tppEwrEtg8ZN5BVDz1bUOmw=";
};
cargoSha256 = "sha256-Bf3fYHhpoX05AmTdwwdRU2YRfGVb1EmaGDm75i+Vs2w=";
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 ];
};
}