gnu: Add cbehave.

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

Signed-off-by: Liliana Marie Prikler <liliana.prikler@gmail.com>
This commit is contained in:
David Elsing 2022-10-13 21:04:13 +00:00 committed by Liliana Marie Prikler
parent e34bf9b634
commit f169d7a128
No known key found for this signature in database
GPG key ID: 442A84B8C70E2F87

View file

@ -38,6 +38,7 @@
;;; Copyright © 2020, 2021, 2022 Maxim Cournoyer <maxim.cournoyer@gmail.com>
;;; Copyright © 2021 Hugo Lecomte <hugo.lecomte@inria.fr>
;;; Copyright © 2022 Maxime Devos <maximedevos@telenet.be>
;;; Copyright © 2022 David Elsing <david.elsing@posteo.net>
;;;
;;; This file is part of GNU Guix.
;;;
@ -491,6 +492,63 @@ (define-public catch2
a multi-paradigm automated test framework for C++ and Objective-C.")
(license license:boost1.0)))
(define-public cbehave
(let ((commit "5deaea0eaaf52f1c5ccdac0c68c003988f348fb4")
(revision "1"))
(package
(name "cbehave")
(version (git-version "0.2.0" revision commit))
(source (origin
(method git-fetch)
(uri (git-reference
(url "https://github.com/bigwhite/cbehave")
(commit commit)))
(file-name (git-file-name name version))
(sha256
(base32
"0kicawxmxn059n3rmfc7r2q5wfjrqbr6lm8dmsi86ba76ak0f9gi"))
(snippet
#~(begin
(for-each delete-file
'("aclocal.m4"
"config.guess" "config.sub" "configure"
"depcomp" "install-sh"
"libtool" "ltmain.sh" "missing"
"Makefile.in" "src/Makefile.in"
"src/example/Makefile.in"))))))
(build-system gnu-build-system)
(arguments
(list
#:configure-flags #~(list "--enable-shared" "--disable-static")
#:phases
#~(modify-phases %standard-phases
(add-before 'bootstrap 'rename-configure.in
(lambda _
(rename-file "configure.in" "configure.ac")))
(add-after 'rename-configure.in 'set-AM_PROG_AR
(lambda _
(substitute* "configure.ac"
(("^AC_PROG_LIBTOOL.*" orig)
(string-append "AM_PROG_AR\n" orig)))))
(add-after 'set-AM_PROG_AR 'enable-tests
(lambda _
(let ((port (open-file "src/example/Makefile.am" "a")))
(display (string-append "\nTESTS = calculator_test"
" text_editor_test string_test"
" product_database_test mock_test\n")
port)
(close-port port))))
(add-before 'check 'create-dummy-file
(lambda _
(invoke "touch" "src/example/foo.txt"))))))
(native-inputs (list autoconf automake libtool))
(home-page "https://github.com/bigwhite/cbehave")
(synopsis "Behavior-driven development framework")
(description "CBehave is a behavior-driven development implemented in C.
It allows the specification of behaviour scenarios using a given-when-then
pattern.")
(license license:apsl2))))
(define-public cmdtest
(package
(name "cmdtest")