29 lines
685 B
Nix
29 lines
685 B
Nix
{ lib, fetchFromGitHub, rustPlatform }:
|
|
|
|
rustPlatform.buildRustPackage rec {
|
|
pname = "fend";
|
|
version = "0.1.16";
|
|
|
|
src = fetchFromGitHub {
|
|
owner = "printfn";
|
|
repo = pname;
|
|
rev = "v${version}";
|
|
sha256 = "sha256-ITS2wE4vwp0W/nlTyX55cY5E95VIwR46JBzF0pD/xsE=";
|
|
};
|
|
|
|
cargoSha256 = "sha256-YqOc/B+ZP1i9xJLrOguQ6fwQr6SV0qvQ3fWwguY2S0I=";
|
|
|
|
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 ];
|
|
};
|
|
}
|