Message ID | 877fe3pcl3.fsf@openmailbox.org |
---|---|
State | New |
Headers |
Received: (qmail 5269 invoked by uid 89); 5 Jun 2016 21:10:08 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Checked: by ClamAV 0.99.1 on sourceware.org X-Virus-Found: No X-Spam-SWARE-Status: No, score=-3.3 required=5.0 tests=BAYES_00, RP_MATCHES_RCVD, SPF_PASS autolearn=ham version=3.3.2 spammy=parameterized X-Spam-Status: No, score=-3.3 required=5.0 tests=BAYES_00, RP_MATCHES_RCVD, SPF_PASS autolearn=ham version=3.3.2 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on sourceware.org X-Spam-Level: X-HELO: lists.gnu.org Received: from lists.gnu.org (HELO lists.gnu.org) (208.118.235.17) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES256-SHA encrypted) ESMTPS; Sun, 05 Jun 2016 21:09:57 +0000 Received: from localhost ([::1]:38613 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from <guix-devel-bounces+patchwork=sourceware.org@gnu.org>) id 1b9fIw-0002VZ-BT for patchwork@sourceware.org; Sun, 05 Jun 2016 17:09:54 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:60426) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from <lgradl@openmailbox.org>) id 1b9fIq-0002VR-G8 for guix-devel@gnu.org; Sun, 05 Jun 2016 17:09:50 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from <lgradl@openmailbox.org>) id 1b9fIi-0000fQ-V3 for guix-devel@gnu.org; Sun, 05 Jun 2016 17:09:44 -0400 Received: from mail2.openmailbox.org ([62.4.1.33]:50102) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from <lgradl@openmailbox.org>) id 1b9fIi-0000eS-Gw for guix-devel@gnu.org; Sun, 05 Jun 2016 17:09:40 -0400 Received: by mail2.openmailbox.org (Postfix, from userid 1001) id 43EE7107624; Sun, 5 Jun 2016 23:09:37 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=openmailbox.org; s=openmailbox; t=1465160977; bh=8iYFqJqY0t2kHaIVR+5qL4xp2Hm89iWKK+OgDyVyl/4=; h=From:To:Cc:Subject:In-Reply-To:References:Date:From; b=UZEp/cIaZjGev1o+lH4a8tgDgg+mb48CJSMgbpioDbnP7pvaRKqzpOv6EsdyFBnCL KFX0+L/PjBpUa7r80/DRKZKA43rECXb0JpF2tEfu8u1OGDFBTwnmygP9e6RabESV+i v9F15PzGirSyd96/3E6F5xcn/ckK8Ehwd8+sNew0= From: Lukas Gradl <lgradl@openmailbox.org> DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=openmailbox.org; s=openmailbox; t=1465160974; bh=8iYFqJqY0t2kHaIVR+5qL4xp2Hm89iWKK+OgDyVyl/4=; h=From:To:Cc:Subject:In-Reply-To:References:Date:From; b=UBIz+n5AMGZzY7gyfw/MtZGgbdy53/2XF0JRhiMqmo6ABiYfpl1rOIEMX/7wXnCeO srganTi084raYmructM2CGyRRvgL1kr9lGCKL3gA/i39Bg/m6Ng2REbhJ2QlwiKKCQ Nugt5y7NHgs219a3tjblc4RrHbZ/2nqtv+ta7dgM= To: Efraim Flashner <efraim@flashner.co.il> Subject: Re: [PATCH] Add googletest In-Reply-To: <20160605131210.GC859@debian-netbook> (Efraim Flashner's message of "Sun, 5 Jun 2016 16:12:10 +0300") References: <874m9fwa0k.fsf@openmailbox.org> <87lh2q2v1u.fsf@openmailbox.org> <20160531214400.GA22303@jasmine> <87twhdez33.fsf@openmailbox.org> <20160602014944.GB31306@jasmine> <87h9dbegsl.fsf@openmailbox.org> <20160605131210.GC859@debian-netbook> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.5 (gnu/linux) Date: Sun, 05 Jun 2016 16:09:28 -0500 Message-ID: <877fe3pcl3.fsf@openmailbox.org> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 62.4.1.33 X-BeenThere: guix-devel@gnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: "Development of GNU Guix and the GNU System distribution." <guix-devel.gnu.org> List-Unsubscribe: <https://lists.gnu.org/mailman/options/guix-devel>, <mailto:guix-devel-request@gnu.org?subject=unsubscribe> List-Archive: <http://lists.gnu.org/archive/html/guix-devel/> List-Post: <mailto:guix-devel@gnu.org> List-Help: <mailto:guix-devel-request@gnu.org?subject=help> List-Subscribe: <https://lists.gnu.org/mailman/listinfo/guix-devel>, <mailto:guix-devel-request@gnu.org?subject=subscribe> Cc: guix-devel@gnu.org Errors-To: guix-devel-bounces+patchwork=sourceware.org@gnu.org Sender: "Guix-devel" <guix-devel-bounces+patchwork=sourceware.org@gnu.org> |
Commit Message
Lukas Gradl
June 5, 2016, 9:09 p.m. UTC
Efraim Flashner <efraim@flashner.co.il> writes: > On Thu, Jun 02, 2016 at 10:44:58AM -0500, Lukas Gradl wrote: >> >> Hi Leo, >> > ... >> >> The tool "pump.py" is distributed with the Googletest source. It >> appears to be a part of the source rather than a bundeled dependency and >> the only reference to it that I found was in Googletest, so I would >> assume it is a part of Googletest. Therefore I did not create a >> seperate package for that, but used the one provided in the Googletest >> source tree. With that, the pre-generated headers can be reproduced. >> The attached patch does that. >> >> Thank you! >> > > A couple last things I found, otherwise it looks great. > >> From 7d4aaba39821130ba824c4b2f8bd236e0d1f1639 Mon Sep 17 00:00:00 2001 >> From: Lukas Gradl <lgradl@openmailbox.org> >> Date: Thu, 2 Jun 2016 10:36:17 -0500 >> Subject: [PATCH] gnu: Add googletest. >> >> * gnu/packages/check.scm (googletest): New variable. >> --- >> gnu/packages/check.scm | 64 ++++++++++++++++++++++++++++++++++++++++++++++++++ >> 1 file changed, 64 insertions(+) >> >> diff --git a/gnu/packages/check.scm b/gnu/packages/check.scm >> index 9eef7a9..4971c71 100644 >> --- a/gnu/packages/check.scm >> +++ b/gnu/packages/check.scm >> @@ -5,6 +5,7 @@ >> ;;; Copyright © 2015 Andreas Enge <andreas@enge.fr> >> ;;; Copyright © 2016 Efraim Flashner <efraim@flashner.co.il> >> ;;; Copyright © 2016 Roel Janssen <roel@gnu.org> >> +;;; Copyright © 2016 Lukas Gradl <lgradl@openmailbox.org> >> ;;; >> ;;; 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,65 @@ 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")) > > add: (file-name (string-append name "-" version ".tar.gz")) I added it. > >> + (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")) >> + (version version)) > ^ > you don't actually use this variable -- > Oh, Sorry about that. This is a leftover from a previous attemt that I forgot to remove. >> + (begin >> + (install-file "lib/.libs/libgtest_main.a" >> + (string-append out "/lib")) >> + (install-file "lib/.libs/libgtest.a" >> + (string-append out "/lib")) >> + (copy-recursively >> + (string-append "include") > > don't need the string-append above > Same here. >> + (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))) >> -- >> 2.7.4 >> Thank you for your review! An updated patch is attached. Best, Lukas
Comments
On Sun, Jun 05, 2016 at 04:09:28PM -0500, Lukas Gradl wrote: > Efraim Flashner <efraim@flashner.co.il> writes: > > > On Thu, Jun 02, 2016 at 10:44:58AM -0500, Lukas Gradl wrote: > >> > >> Hi Leo, > >> > > ... > >> > >> The tool "pump.py" is distributed with the Googletest source. It > >> appears to be a part of the source rather than a bundeled dependency and > >> the only reference to it that I found was in Googletest, so I would > >> assume it is a part of Googletest. Therefore I did not create a > >> seperate package for that, but used the one provided in the Googletest > >> source tree. With that, the pre-generated headers can be reproduced. > >> The attached patch does that. > >> > >> Thank you! > >> > > > > A couple last things I found, otherwise it looks great. > > > >> From 7d4aaba39821130ba824c4b2f8bd236e0d1f1639 Mon Sep 17 00:00:00 2001 > >> From: Lukas Gradl <lgradl@openmailbox.org> > >> Date: Thu, 2 Jun 2016 10:36:17 -0500 > >> Subject: [PATCH] gnu: Add googletest. > >> > >> * gnu/packages/check.scm (googletest): New variable. > >> --- > >> gnu/packages/check.scm | 64 ++++++++++++++++++++++++++++++++++++++++++++++++++ > >> 1 file changed, 64 insertions(+) > >> > >> diff --git a/gnu/packages/check.scm b/gnu/packages/check.scm > >> index 9eef7a9..4971c71 100644 > >> --- a/gnu/packages/check.scm > >> +++ b/gnu/packages/check.scm > >> @@ -5,6 +5,7 @@ > >> ;;; Copyright © 2015 Andreas Enge <andreas@enge.fr> > >> ;;; Copyright © 2016 Efraim Flashner <efraim@flashner.co.il> > >> ;;; Copyright © 2016 Roel Janssen <roel@gnu.org> > >> +;;; Copyright © 2016 Lukas Gradl <lgradl@openmailbox.org> > >> ;;; > >> ;;; 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,65 @@ 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")) > > > > add: (file-name (string-append name "-" version ".tar.gz")) > > I added it. > > > > >> + (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")) > >> + (version version)) > > ^ > > you don't actually use this variable -- > > > > Oh, Sorry about that. This is a leftover from a previous attemt that I > forgot to remove. > > >> + (begin > >> + (install-file "lib/.libs/libgtest_main.a" > >> + (string-append out "/lib")) > >> + (install-file "lib/.libs/libgtest.a" > >> + (string-append out "/lib")) > >> + (copy-recursively > >> + (string-append "include") > > > > don't need the string-append above > > > > Same here. > > >> + (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))) > >> -- > >> 2.7.4 > >> > > > Thank you for your review! > > An updated patch is attached. > > Best, > Lukas > > > From 54223517c0c05b5c5bfcca055c8b12cb650c8b40 Mon Sep 17 00:00:00 2001 > From: Lukas Gradl <lgradl@openmailbox.org> > Date: Sun, 5 Jun 2016 16:03:56 -0500 > Subject: [PATCH] gnu: Add googletest. > > * gnu/packages/check.scm (googletest): New variable. > --- > gnu/packages/check.scm | 63 ++++++++++++++++++++++++++++++++++++++++++++++++++ > 1 file changed, 63 insertions(+) > > diff --git a/gnu/packages/check.scm b/gnu/packages/check.scm > index 9eef7a9..64b5006 100644 > --- a/gnu/packages/check.scm > +++ b/gnu/packages/check.scm > @@ -5,6 +5,7 @@ > ;;; Copyright © 2015 Andreas Enge <andreas@enge.fr> > ;;; Copyright © 2016 Efraim Flashner <efraim@flashner.co.il> > ;;; Copyright © 2016 Roel Janssen <roel@gnu.org> > +;;; Copyright © 2016 Lukas Gradl <lgradl@openmailbox.org> > ;;; > ;;; 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,64 @@ 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))) > -- > 2.7.4 > Patch pushed!
Efraim Flashner <efraim@flashner.co.il> writes: > On Sun, Jun 05, 2016 at 04:09:28PM -0500, Lukas Gradl wrote: >> Efraim Flashner <efraim@flashner.co.il> writes: >> >> > On Thu, Jun 02, 2016 at 10:44:58AM -0500, Lukas Gradl wrote: >> >> >> >> Hi Leo, >> >> >> > ... >> >> >> >> The tool "pump.py" is distributed with the Googletest source. It >> >> appears to be a part of the source rather than a bundeled dependency and >> >> the only reference to it that I found was in Googletest, so I would >> >> assume it is a part of Googletest. Therefore I did not create a >> >> seperate package for that, but used the one provided in the Googletest >> >> source tree. With that, the pre-generated headers can be reproduced. >> >> The attached patch does that. >> >> >> >> Thank you! >> >> >> > >> > A couple last things I found, otherwise it looks great. >> > >> >> From 7d4aaba39821130ba824c4b2f8bd236e0d1f1639 Mon Sep 17 00:00:00 2001 >> >> From: Lukas Gradl <lgradl@openmailbox.org> >> >> Date: Thu, 2 Jun 2016 10:36:17 -0500 >> >> Subject: [PATCH] gnu: Add googletest. >> >> >> >> * gnu/packages/check.scm (googletest): New variable. >> >> --- >> >> gnu/packages/check.scm | 64 ++++++++++++++++++++++++++++++++++++++++++++++++++ >> >> 1 file changed, 64 insertions(+) >> >> >> >> diff --git a/gnu/packages/check.scm b/gnu/packages/check.scm >> >> index 9eef7a9..4971c71 100644 >> >> --- a/gnu/packages/check.scm >> >> +++ b/gnu/packages/check.scm >> >> @@ -5,6 +5,7 @@ >> >> ;;; Copyright © 2015 Andreas Enge <andreas@enge.fr> >> >> ;;; Copyright © 2016 Efraim Flashner <efraim@flashner.co.il> >> >> ;;; Copyright © 2016 Roel Janssen <roel@gnu.org> >> >> +;;; Copyright © 2016 Lukas Gradl <lgradl@openmailbox.org> >> >> ;;; >> >> ;;; 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,65 @@ 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")) >> > >> > add: (file-name (string-append name "-" version ".tar.gz")) >> >> I added it. >> >> > >> >> + (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")) >> >> + (version version)) >> > ^ >> > you don't actually use this variable -- >> > >> >> Oh, Sorry about that. This is a leftover from a previous attemt that I >> forgot to remove. >> >> >> + (begin >> >> + (install-file "lib/.libs/libgtest_main.a" >> >> + (string-append out "/lib")) >> >> + (install-file "lib/.libs/libgtest.a" >> >> + (string-append out "/lib")) >> >> + (copy-recursively >> >> + (string-append "include") >> > >> > don't need the string-append above >> > >> >> Same here. >> >> >> + (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))) >> >> -- >> >> 2.7.4 >> >> >> >> >> Thank you for your review! >> >> An updated patch is attached. >> >> Best, >> Lukas >> >> > >> From 54223517c0c05b5c5bfcca055c8b12cb650c8b40 Mon Sep 17 00:00:00 2001 >> From: Lukas Gradl <lgradl@openmailbox.org> >> Date: Sun, 5 Jun 2016 16:03:56 -0500 >> Subject: [PATCH] gnu: Add googletest. >> >> * gnu/packages/check.scm (googletest): New variable. >> --- >> gnu/packages/check.scm | 63 ++++++++++++++++++++++++++++++++++++++++++++++++++ >> 1 file changed, 63 insertions(+) >> >> diff --git a/gnu/packages/check.scm b/gnu/packages/check.scm >> index 9eef7a9..64b5006 100644 >> --- a/gnu/packages/check.scm >> +++ b/gnu/packages/check.scm >> @@ -5,6 +5,7 @@ >> ;;; Copyright © 2015 Andreas Enge <andreas@enge.fr> >> ;;; Copyright © 2016 Efraim Flashner <efraim@flashner.co.il> >> ;;; Copyright © 2016 Roel Janssen <roel@gnu.org> >> +;;; Copyright © 2016 Lukas Gradl <lgradl@openmailbox.org> >> ;;; >> ;;; 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,64 @@ 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))) >> -- >> 2.7.4 >> > > Patch pushed! Thank you!
From 54223517c0c05b5c5bfcca055c8b12cb650c8b40 Mon Sep 17 00:00:00 2001 From: Lukas Gradl <lgradl@openmailbox.org> Date: Sun, 5 Jun 2016 16:03:56 -0500 Subject: [PATCH] gnu: Add googletest. * gnu/packages/check.scm (googletest): New variable. --- gnu/packages/check.scm | 63 ++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 63 insertions(+) diff --git a/gnu/packages/check.scm b/gnu/packages/check.scm index 9eef7a9..64b5006 100644 --- a/gnu/packages/check.scm +++ b/gnu/packages/check.scm @@ -5,6 +5,7 @@ ;;; Copyright © 2015 Andreas Enge <andreas@enge.fr> ;;; Copyright © 2016 Efraim Flashner <efraim@flashner.co.il> ;;; Copyright © 2016 Roel Janssen <roel@gnu.org> +;;; Copyright © 2016 Lukas Gradl <lgradl@openmailbox.org> ;;; ;;; 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,64 @@ 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))) -- 2.7.4