diff options
author | Artyom V. Poptsov <poptsov.artyom@gmail.com> | 2022-06-23 22:07:05 +0300 |
---|---|---|
committer | Ludovic Courtès <ludo@gnu.org> | 2022-07-03 16:04:23 +0200 |
commit | 91a517653815eee0dac2b50543921b6c65f19378 (patch) | |
tree | c75473a31466124114351ec2c9e25accfe13f436 | |
parent | 9dfe5142bd0d9c2dcf11d3157a7f36018bd215b4 (diff) | |
download | guix-91a517653815eee0dac2b50543921b6c65f19378.tar guix-91a517653815eee0dac2b50543921b6c65f19378.tar.gz |
gnu: Add utest-h.
* gnu/packages/c.scm (utest-h): New variable.
Signed-off-by: Ludovic Courtès <ludo@gnu.org>
-rw-r--r-- | gnu/packages/c.scm | 39 |
1 files changed, 39 insertions, 0 deletions
diff --git a/gnu/packages/c.scm b/gnu/packages/c.scm index 1ce507119f..327f41589d 100644 --- a/gnu/packages/c.scm +++ b/gnu/packages/c.scm @@ -14,6 +14,7 @@ ;;; Copyright © 2021 David Dashyan <mail@davie.li> ;;; Copyright © 2021 Foo Chuan Wei <chuanwei.foo@hotmail.com> ;;; Copyright © 2022 (unmatched parenthesis <paren@disroot.org> +;;; Copyright © 2022 Artyom V. Poptsov <poptsov.artyom@gmail.com> ;;; ;;; This file is part of GNU Guix. ;;; @@ -1128,3 +1129,41 @@ performance concurrent systems developed in C99+.") C and C++. The functions it provides are like those from the C header string.h, but with a utf8* prefix instead of the str* prefix.") (license license:unlicense)))) + +(define-public utest-h + ;; The latest commit is used as there is no release. + (let ((commit "54458e248f875f1a51f0af8bec8ca6ae7761b9d1") + (revision "0")) + (package + (name "utest-h") + (version (git-version "0.0.0" revision commit)) + (source (origin + (method git-fetch) + (uri (git-reference + (url "https://github.com/sheredom/utest.h") + (commit commit))) + (file-name (git-file-name "utest.h" version)) + (sha256 + (base32 + "1ikl5jwmjdw1mblqyl2kvnqwkjgaz78c1h7mjcfmzjc0d3h8kh44")))) + (build-system cmake-build-system) + (arguments + `(#:phases (modify-phases %standard-phases + (delete 'build) + (delete 'configure) + (replace 'check + (lambda* (#:key tests? #:allow-other-keys) + (when tests? + (with-directory-excursion "test" + (invoke "cmake" ".") + (invoke "make"))))) + (replace 'install + (lambda* (#:key outputs #:allow-other-keys) + (let ((out (assoc-ref outputs "out"))) + (install-file "utest.h" + (string-append out "/include")))))))) + (home-page "https://www.duskborn.com/utest_h/") + (synopsis "Single-header unit testing framework for C and C++") + (description + "This package provides a header-only unit testing library for C/C++.") + (license license:unlicense)))) |