mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-12-23 06:03:40 +00:00
36 lines
793 B
Nix
36 lines
793 B
Nix
{ lib
|
|
, stdenv
|
|
, fetchFromGitHub
|
|
, rustPlatform
|
|
, darwin
|
|
}:
|
|
|
|
rustPlatform.buildRustPackage rec {
|
|
pname = "fend";
|
|
version = "1.0.3";
|
|
|
|
src = fetchFromGitHub {
|
|
owner = "printfn";
|
|
repo = pname;
|
|
rev = "v${version}";
|
|
sha256 = "sha256-eYCFX3JVsTnmVzHQd9JU6BT80kS0LTjVwVcfNJink1M=";
|
|
};
|
|
|
|
cargoSha256 = "sha256-+N8/ZKj1Ht2lkTYSEm/lrLtopBQqc82gIFiLzJ6NogU=";
|
|
|
|
buildInputs = lib.optionals stdenv.isDarwin [ darwin.apple_sdk.frameworks.Security ];
|
|
|
|
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 ];
|
|
};
|
|
}
|