guix-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

01/01: gnu: Add googletest.


From: Efraim Flashner
Subject: 01/01: gnu: Add googletest.
Date: Thu, 9 Jun 2016 18:40:15 +0000 (UTC)

efraim pushed a commit to branch master
in repository guix.

commit 5f6aba6b62f11ed3a3efe95fabbe33321370c5b0
Author: Lukas Gradl <address@hidden>
Date:   Sun Jun 5 16:03:56 2016 -0500

    gnu: Add googletest.
    
    * gnu/packages/check.scm (googletest): New variable.
    
    Signed-off-by: Efraim Flashner <address@hidden>
---
 gnu/packages/check.scm |   61 ++++++++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 61 insertions(+)

diff --git a/gnu/packages/check.scm b/gnu/packages/check.scm
index 9eef7a9..cecc026 100644
--- a/gnu/packages/check.scm
+++ b/gnu/packages/check.scm
@@ -5,6 +5,7 @@
 ;;; Copyright © 2015 Andreas Enge <address@hidden>
 ;;; Copyright © 2016 Efraim Flashner <address@hidden>
 ;;; Copyright © 2016 Roel Janssen <address@hidden>
+;;; Copyright © 2016 Lukas Gradl <address@hidden>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -24,6 +25,7 @@
 (define-module (gnu packages check)
   #:use-module (gnu packages)
   #:use-module (gnu packages autotools)
+  #:use-module (gnu packages python)
   #:use-module (guix licenses)
   #:use-module (guix packages)
   #:use-module (guix download)
@@ -193,3 +195,62 @@ in the code.  Cppcheck primarily detects the types of bugs 
that the compilers
 normally do not detect.  The goal is to detect only real errors in the code
 (i.e. have zero false positives).")
     (license gpl3+)))
+
+(define-public googletest
+  (package
+    (name "googletest")
+    (version "1.7.0")
+    (source
+     (origin
+       (method url-fetch)
+       (uri (string-append "https://github.com/google/googletest/archive/";
+                           "release-" version ".tar.gz"))
+       (file-name (string-append name "-" version ".tar.gz"))
+       (sha256
+        (base32
+         "1k0nf1l9cb3prdmsvaajl5i31bx86c1mw0d5jgzykz7rzm36afpp"))))
+    (build-system gnu-build-system)
+    (native-inputs
+     `(("python-2" ,python-2)
+       ("autoconf" ,autoconf)
+       ("automake" ,automake)
+       ("libtool" ,libtool)))
+    (arguments
+     `(#:phases
+       (modify-phases %standard-phases
+         (add-before 'configure 'autoconf
+           (lambda _
+             (zero? (system* "autoreconf" "-vfi"))))
+         (add-before 'autoconf 'generate-headers
+           (lambda _
+             (begin
+               (delete-file "include/gtest/gtest-param-test.h")
+               (system* "python2" "scripts/pump.py"
+                        "include/gtest/gtest-param-test.h.pump")
+               (delete-file "include/gtest/internal/gtest-tuple.h")
+               (system* "python2" "scripts/pump.py"
+                        "include/gtest//internal/gtest-tuple.h.pump")
+               (delete-file
+                "include/gtest/internal/gtest-param-util-generated.h")
+               (system*
+                "python2" "scripts/pump.py"
+                "include/gtest/internal/gtest-param-util-generated.h.pump")
+               (delete-file "include/gtest/internal/gtest-type-util.h")
+               (system* "python2" "scripts/pump.py"
+                        "include/gtest/internal/gtest-type-util.h.pump"))))
+         (replace 'install
+           (lambda _
+             (let ((out (assoc-ref %outputs "out")))
+               (begin
+                 (install-file "lib/.libs/libgtest_main.a"
+                               (string-append out "/lib"))
+                 (install-file "lib/.libs/libgtest.a"
+                               (string-append out "/lib"))
+                 (copy-recursively "include"
+                  (string-append out "/include")))))))))
+    (home-page "https://github.com/google/googletest/";)
+    (synopsis "Test discovery and XUnit test framework")
+    (description "Google Test features an XUnit test framework, automated test
+discovery, death tests, assertions, parameterized tests and XML test report
+generation.")
+    (license bsd-3)))



reply via email to

[Prev in Thread] Current Thread [Next in Thread]