From cdf4908c47f5bec8cd6914a4c843fb7242fcb9ec Mon Sep 17 00:00:00 2001 From: Vivien Kraus Date: Sun, 26 Nov 2023 16:03:31 +0100 Subject: [PATCH] gnu: Add munit. * gnu/packages/check.scm (munit): New variable. Change-Id: I193e55ef4ceec1d62f595dd779f7b3d76154fad4 Reviewed-by: Maxim Cournoyer Signed-off-by: Liliana Marie Prikler --- gnu/packages/check.scm | 40 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 40 insertions(+) diff --git a/gnu/packages/check.scm b/gnu/packages/check.scm index 70d109608e2ce2b3c65d6e8ad73171c0742348ca..c1d71498a0c05e0deb1ac5c0804f0f98623b9373 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 . + (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 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))))