mini-calc: 2.13.0 -> 2.13.2, add version check

This commit is contained in:
Sigmanificient 2024-05-15 14:42:49 +02:00
parent b3fcfcfabd
commit c09e452243

View File

@ -4,27 +4,35 @@
fetchFromGitHub,
gnuplot,
makeWrapper,
testers,
mini-calc,
}:
rustPlatform.buildRustPackage rec {
pname = "mini-calc";
version = "2.13.0";
version = "2.13.2";
src = fetchFromGitHub {
owner = "coco33920";
repo = "calc";
rev = version;
hash = "sha256-rvQXn0VuOjB7CSf+bDTGxjeMKpbJGhVmyDLNYSy/Mlw=";
hash = "sha256-qLPIo+Ht34YApWwl16Xscq2+vlAdlbCK5AeKy5q9cO0=";
};
cargoHash = "sha256-QFzrJBnGKAgDhjbbik0WP3Y1fNoHMAiWpEHfidFQGPk=";
cargoHash = "sha256-oWN9JLPswNKRKDG3dh3z7aleAaqQ7AlMP+Zp2BpBueE=";
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 = "A fully-featured minimalistic configurable calculator written in Rust";
changelog = "https://github.com/coco33920/calc/blob/${version}/CHANGELOG.md";