Some checks failed
Periodic Merges (6h) / master → staging-nixos (push) Failing after 12m50s
Periodic Merges (6h) / master → staging-next (push) Failing after 12m54s
Periodic Merges (24h) / merge-base(master,staging) → haskell-updates (push) Failing after 11m54s
Periodic Merges (6h) / staging-next → staging (push) Failing after 12m13s
Periodic Merges (24h) / staging-next-25.05 → staging-25.05 (push) Failing after 13m24s
Periodic Merges (24h) / release-25.05 → staging-next-25.05 (push) Failing after 14m28s
46 lines
1.2 KiB
Nix
46 lines
1.2 KiB
Nix
{
|
|
lib,
|
|
rustPlatform,
|
|
fetchFromGitHub,
|
|
gnuplot,
|
|
makeWrapper,
|
|
testers,
|
|
mini-calc,
|
|
}:
|
|
rustPlatform.buildRustPackage rec {
|
|
pname = "mini-calc";
|
|
version = "4.0.0";
|
|
|
|
src = fetchFromGitHub {
|
|
owner = "vanilla-extracts";
|
|
repo = "calc";
|
|
rev = version;
|
|
hash = "sha256-601BmecY+jbiD39buN68MeJKd5wguH0hahHquHadsL4=";
|
|
};
|
|
|
|
cargoHash = "sha256-9Ug6lyDvacj47FnLzJo4fwpXeMYxgSlMB7+2fIv5oxo=";
|
|
|
|
nativeBuildInputs = [ makeWrapper ];
|
|
postFixup = ''
|
|
wrapProgram $out/bin/mini-calc \
|
|
--prefix PATH : "${lib.makeBinPath [ gnuplot ]}"
|
|
'';
|
|
|
|
passthru.tests.version = testers.testVersion {
|
|
package = mini-calc;
|
|
# `mini-calc -v` does not output in the test env, fallback to pipe
|
|
command = "echo -v | mini-calc";
|
|
version = "v${version}";
|
|
};
|
|
|
|
meta = {
|
|
description = "Fully-featured minimalistic configurable calculator written in Rust";
|
|
changelog = "https://github.com/vanilla-extracts/calc/blob/${version}/CHANGELOG.md";
|
|
homepage = "https://calc.charlotte-thomas.me/";
|
|
license = lib.licenses.gpl3Plus;
|
|
maintainers = with lib.maintainers; [ sigmanificient ];
|
|
mainProgram = "mini-calc";
|
|
platforms = lib.platforms.unix;
|
|
};
|
|
}
|