diff options
author | Aleksana <me@aleksana.moe> | 2024-05-18 00:55:48 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-05-18 00:55:48 +0800 |
commit | 1ea918a171005013f32a55b11444660b819a640a (patch) | |
tree | eb310960e7b8507f6c3230963be16aca78383e2b | |
parent | 1dddca96f8201236296fee6e3801df31a80c732f (diff) | |
parent | c09e452243fd0d9b8fa6459ad82e524038290035 (diff) |
Merge pull request #311936 from Sigmanificient/calc-2.13.2
mini-calc: 2.13.0 -> 2.13.2, add version check
-rw-r--r-- | pkgs/by-name/mi/mini-calc/package.nix | 16 |
1 files changed, 12 insertions, 4 deletions
diff --git a/pkgs/by-name/mi/mini-calc/package.nix b/pkgs/by-name/mi/mini-calc/package.nix index d8a385121e1a4..ad717a93f3ff5 100644 --- a/pkgs/by-name/mi/mini-calc/package.nix +++ b/pkgs/by-name/mi/mini-calc/package.nix @@ -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"; |