lilyp pushed a commit to branch gnome-team in repository guix. commit aa7f6137d99bd5dc33620a5bedb611d4a128d365 Author: Vivien Kraus <viv...@planete-kraus.eu> AuthorDate: Sun Nov 26 16:03:31 2023 +0100
gnu: Add munit. * gnu/packages/check.scm (munit): New variable. Change-Id: I193e55ef4ceec1d62f595dd779f7b3d76154fad4 Reviewed-by: Maxim Cournoyer <maxim.courno...@gmail.com> Signed-off-by: Liliana Marie Prikler <liliana.prik...@gmail.com> --- gnu/packages/check.scm | 40 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 40 insertions(+) diff --git a/gnu/packages/check.scm b/gnu/packages/check.scm index 70d109608e..c1d71498a0 100644 --- a/gnu/packages/check.scm +++ b/gnu/packages/check.scm @@ -4540,3 +4540,43 @@ helpers for writing tests.") command line filters to process a subunit stream and language bindings for Python, C, C++ and shell. Bindings are easy to write for other languages.") (license (list license:asl2.0 license:bsd-3)))) ;user can pick + +(define-public munit + ;; Last release in 2016, see also <https://github.com/nemequ/munit/issues/95>. + (let ((commit "fbbdf1467eb0d04a6ee465def2e529e4c87f2118") + (revision "1")) + (package + (name "munit") + (version (git-version "0.2.0" revision commit)) + (source (origin + (method git-fetch) + (uri (git-reference + (url "https://github.com/nemequ/munit") + (commit commit))) + (file-name (git-file-name name version)) + (sha256 + (base32 + "13725v4pps2bpndniksa58nqi9gvx0f0900k0rqvp95bxw5z8vda")))) + (build-system meson-build-system) + (arguments + (list + #:phases + #~(modify-phases %standard-phases + (add-after 'unpack 'fix-install + ;; munit is paradoxically configured to only be installed + ;; when built as a subproject. + ;; See <https://github.com/nemequ/munit/pull/67> for a + ;; pull request that aims to fix this. As we don't care about + ;; bundling scenarios (or rather: aim to unbundle everything), + ;; install it unconditionally. + (lambda _ + (substitute* "meson.build" + (("install: meson.is_subproject\\(\\)") + "install: true"))))))) + (synopsis "Small unit testing framework for C") + (description + "µnit is a small testing framework for C with nested test suites, +parameterized tests, timing of the wall clock and CPU time, reproducible +random number generation, and more.") + (home-page "https://nemequ.github.io/munit/") + (license license:x11))))