~ruther/guix-local

cdf4908c47f5bec8cd6914a4c843fb7242fcb9ec — Vivien Kraus 2 years ago 0c1cfca
gnu: Add munit.

* gnu/packages/check.scm (munit): New variable.

Change-Id: I193e55ef4ceec1d62f595dd779f7b3d76154fad4
Reviewed-by: Maxim Cournoyer <maxim.cournoyer@gmail.com>
Signed-off-by: Liliana Marie Prikler <liliana.prikler@gmail.com>
1 files changed, 40 insertions(+), 0 deletions(-)

M gnu/packages/check.scm
M gnu/packages/check.scm => gnu/packages/check.scm +40 -0
@@ 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))))