mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-12-11 16:23:26 +00:00
755b915a15
nix run nixpkgs#silver-searcher -- -G '\.nix$' -0l 'description.*"[Aa]n?' pkgs \ | xargs -0 nix run nixpkgs#gnused -- -i '' -Ee 's/(description.*")[Aa]n? (.)/\1\U\2/'
46 lines
1.1 KiB
Nix
46 lines
1.1 KiB
Nix
{
|
|
lib,
|
|
rustPlatform,
|
|
fetchFromGitHub,
|
|
gnuplot,
|
|
makeWrapper,
|
|
testers,
|
|
mini-calc,
|
|
}:
|
|
rustPlatform.buildRustPackage rec {
|
|
pname = "mini-calc";
|
|
version = "3.2.0";
|
|
|
|
src = fetchFromGitHub {
|
|
owner = "coco33920";
|
|
repo = "calc";
|
|
rev = version;
|
|
hash = "sha256-f2xmc6wzZ5MwwBDYQNoxbFmIclZWd/xOOI4/MCmrnEI=";
|
|
};
|
|
|
|
cargoHash = "sha256-OiAU94URgOHZ/iNbCF5rE55zfZNkW3bdjPZo05kpIRo=";
|
|
|
|
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/coco33920/calc/blob/${version}/CHANGELOG.md";
|
|
homepage = "https://calc.nwa2coco.fr";
|
|
license = lib.licenses.gpl3Plus;
|
|
maintainers = with lib.maintainers; [ sigmanificient ];
|
|
mainProgram = "mini-calc";
|
|
platforms = lib.platforms.unix;
|
|
};
|
|
}
|