mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-12-15 02:03:01 +00:00
29 lines
685 B
Nix
29 lines
685 B
Nix
{ lib, fetchFromGitHub, rustPlatform }:
|
|
|
|
rustPlatform.buildRustPackage rec {
|
|
pname = "fend";
|
|
version = "0.1.22";
|
|
|
|
src = fetchFromGitHub {
|
|
owner = "printfn";
|
|
repo = pname;
|
|
rev = "v${version}";
|
|
sha256 = "sha256-JuOhJGszsEBBz9G4jjV7OhCAyrSOIktYgoDpYPMk21c=";
|
|
};
|
|
|
|
cargoSha256 = "sha256-rKSbsxFt+ntE68eQK6zbIPdOL9JBOgqyqLnb8paVVo0=";
|
|
|
|
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 ];
|
|
};
|
|
}
|