Merge pull request #311936 from Sigmanificient/calc-2.13.2

mini-calc: 2.13.0 -> 2.13.2, add version check
This commit is contained in:
Aleksana 2024-05-18 00:55:48 +08:00 committed by GitHub
commit 1ea918a171
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

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";