[bug#66263,23/23] gnu: Add unity.
Commit Message
* gnu/packages/check.scm (unity): New variable.
---
gnu/packages/check.scm | 41 +++++++++++++++++++++++++++++++++++++++++
1 file changed, 41 insertions(+)
Comments
Hi,
Jean-Pierre De Jesus DIAZ <jean@foundationdevices.com> writes:
> * gnu/packages/check.scm (unity): New variable.
> ---
> gnu/packages/check.scm | 41 +++++++++++++++++++++++++++++++++++++++++
> 1 file changed, 41 insertions(+)
>
> diff --git a/gnu/packages/check.scm b/gnu/packages/check.scm
> index 5af3b49280..db368663d4 100644
> --- a/gnu/packages/check.scm
> +++ b/gnu/packages/check.scm
> @@ -87,6 +87,7 @@ (define-module (gnu packages check)
> #:use-module (gnu packages python-web)
> #:use-module (gnu packages python-xyz)
> #:use-module (gnu packages python-science)
> + #:use-module (gnu packages ruby)
> #:use-module (gnu packages texinfo)
> #:use-module (gnu packages time)
> #:use-module (gnu packages xml)
> @@ -3170,6 +3171,46 @@ (define-public unittest-cpp
> portable to just about any platform.")
> (license license:expat)))
>
> +(define-public unity
> + (let ((revision "0")
> + (commit "2775e1b05875cf45afce7153e36af76ddbfdba26"))
> + (package
> + (name "unity")
> + (version (git-version "2.5.4" revision commit))
> + (source (origin
> + (method git-fetch)
> + (uri (git-reference
> + (url "https://github.com/ThrowTheSwitch/Unity")
> + (commit commit)))
> + (file-name (git-file-name name version))
> + (sha256
> + (base32
> + "0y803ibjkqvj1fil0a0hzs7x0m98amm5ibwl8xxk3p8bj9wgdps1"))))
> + (build-system meson-build-system)
> + (arguments
> + (list #:configure-flags #~(list "-Dextension_fixture=true"
> + "-Dextension_memory=true"
> + "-Dsupport_double=true")
> + #:phases #~(modify-phases %standard-phases
> + (replace 'check
> + (lambda* (#:key tests? #:allow-other-keys)
> + (when tests?
> + (with-directory-excursion "../source/test"
> + (invoke "rake" "all"))))))))
> + (native-inputs
> + (append (list python)
> + (if (not (%current-target-system))
> + (list ruby
> + ruby-rake
> + ruby-rspec
> + ruby-rubocop)
> + '())))
I believe these are test-related inputs? Should the tests be disabled
when cross-compiling? Otherwise it'd probably fail, no?
@@ -87,6 +87,7 @@ (define-module (gnu packages check)
#:use-module (gnu packages python-web)
#:use-module (gnu packages python-xyz)
#:use-module (gnu packages python-science)
+ #:use-module (gnu packages ruby)
#:use-module (gnu packages texinfo)
#:use-module (gnu packages time)
#:use-module (gnu packages xml)
@@ -3170,6 +3171,46 @@ (define-public unittest-cpp
portable to just about any platform.")
(license license:expat)))
+(define-public unity
+ (let ((revision "0")
+ (commit "2775e1b05875cf45afce7153e36af76ddbfdba26"))
+ (package
+ (name "unity")
+ (version (git-version "2.5.4" revision commit))
+ (source (origin
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://github.com/ThrowTheSwitch/Unity")
+ (commit commit)))
+ (file-name (git-file-name name version))
+ (sha256
+ (base32
+ "0y803ibjkqvj1fil0a0hzs7x0m98amm5ibwl8xxk3p8bj9wgdps1"))))
+ (build-system meson-build-system)
+ (arguments
+ (list #:configure-flags #~(list "-Dextension_fixture=true"
+ "-Dextension_memory=true"
+ "-Dsupport_double=true")
+ #:phases #~(modify-phases %standard-phases
+ (replace 'check
+ (lambda* (#:key tests? #:allow-other-keys)
+ (when tests?
+ (with-directory-excursion "../source/test"
+ (invoke "rake" "all"))))))))
+ (native-inputs
+ (append (list python)
+ (if (not (%current-target-system))
+ (list ruby
+ ruby-rake
+ ruby-rspec
+ ruby-rubocop)
+ '())))
+ (home-page "http://throwtheswitch.org")
+ (synopsis "Unit testing framework for C")
+ (description "Unity is a lightweight unit testing framework for C. It was
+designed to allow running tests on embedded devices and on a host computer.")
+ (license license:expat))))
+
(define-public libfaketime
(package
(name "libfaketime")