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

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

36 lines
793 B
Nix
Raw Normal View History

{ lib
, stdenv
, fetchFromGitHub
, rustPlatform
, darwin
}:
2020-11-09 01:03:25 +00:00
rustPlatform.buildRustPackage rec {
pname = "fend";
2022-09-23 14:28:11 +00:00
version = "1.1.1";
2020-11-09 01:03:25 +00:00
src = fetchFromGitHub {
owner = "printfn";
repo = pname;
rev = "v${version}";
2022-09-23 14:28:11 +00:00
sha256 = "sha256-1hoMIZ4mfXYF+ec/Eax2fSNBbx+UEY2c/jQCaRi+UqU=";
2020-11-09 01:03:25 +00:00
};
2022-09-23 14:28:11 +00:00
cargoSha256 = "sha256-jGPS9x4DKQCXZkaJu9qIEqoxIu+1WraqfqxGFRV5z7A=";
2020-11-09 01:03:25 +00:00
buildInputs = lib.optionals stdenv.isDarwin [ darwin.apple_sdk.frameworks.Security ];
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 ];
};
}