From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:57077) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gHjfi-0003iL-WD for guix-patches@gnu.org; Wed, 31 Oct 2018 02:08:08 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1gHjfe-0000l1-R0 for guix-patches@gnu.org; Wed, 31 Oct 2018 02:08:06 -0400 Received: from debbugs.gnu.org ([208.118.235.43]:51913) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1gHjfe-0000kX-7B for guix-patches@gnu.org; Wed, 31 Oct 2018 02:08:02 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1gHjfe-0006dx-0m for guix-patches@gnu.org; Wed, 31 Oct 2018 02:08:02 -0400 Subject: [bug#33215] [PATCH 03/11] gnu: clojure: Refactor to ensure there's a single list of libraries. References: <87muquhcw3.fsf@gmail.com> In-Reply-To: <87muquhcw3.fsf@gmail.com> Resent-Message-ID: From: Alex Vong Date: Wed, 31 Oct 2018 14:07:22 +0800 Message-ID: <87a7muhco5.fsf@gmail.com> MIME-Version: 1.0 Content-Type: multipart/signed; boundary="==-=-="; micalg=pgp-sha256; protocol="application/pgp-signature" List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+kyle=kyleam.com@gnu.org Sender: "Guix-patches" To: 33215@debbugs.gnu.org Cc: alexvong1995@gmail.com --==-=-= Content-Type: multipart/mixed; boundary="=-=-=" --=-=-= Content-Type: text/x-diff Content-Disposition: inline; filename=0003-gnu-clojure-Refactor-to-ensure-there-s-a-single-list.patch Content-Transfer-Encoding: quoted-printable From=20cd355d8cec3c747f58748d5cf750af7d6efd5d5a Mon Sep 17 00:00:00 2001 From: Alex Vong Date: Sun, 14 Oct 2018 00:08:29 +0800 Subject: [PATCH 03/11] gnu: clojure: Refactor to ensure there's a single li= st of libraries. This avoids having to update multiple lists. * gnu/packages/lisp.scm (clojure)[native-inputs]: Use new local variable. [arguments]: Adjust build phases accordingly. =2D-- gnu/packages/lisp.scm | 101 ++++++++++++++++++++---------------------- 1 file changed, 49 insertions(+), 52 deletions(-) diff --git a/gnu/packages/lisp.scm b/gnu/packages/lisp.scm index df0c0a87e..c42878fd3 100644 =2D-- a/gnu/packages/lisp.scm +++ b/gnu/packages/lisp.scm @@ -562,12 +562,40 @@ interface.") license:clarified-artistic)))) ;TRIVIAL-LDAP package =20 (define-public clojure =2D (let ((submodule (lambda (prefix version hash) =2D (origin =2D (method url-fetch) =2D (uri (string-append "https://github.com/clojure/" =2D prefix version ".tar.gz")) =2D (sha256 (base32 hash)))))) + (let* ((lib (lambda (prefix version hash) + (origin (method url-fetch) + (uri (string-append "https://github.com/clojure/" + prefix version ".tar.gz")) + (sha256 (base32 hash))))) + ;; The libraries below are needed to run the tests. + (libraries + `(("core-specs-alpha-src" + ,(lib "core.specs.alpha/archive/core.specs.alpha-" + "0.1.24" + "0v2a0svf1ar2y42ajxwsjr7zmm5j7pp2zwrd2jh3k7xzd1p9x1fv")) + ("data-generators-src" + ,(lib "data.generators/archive/data.generators-" + "0.1.2" + "0kki093jp4ckwxzfnw8ylflrfqs8b1i1wi9iapmwcsy328dmgzp1")) + ("spec-alpha-src" + ,(lib "spec.alpha/archive/spec.alpha-" + "0.1.143" + "00alf0347licdn773w2jarpllyrbl52qz4d8mw61anjksacxylzz")) + ("test-check-src" + ,(lib "test.check/archive/test.check-" + "0.9.0" + "0p0mnyhr442bzkz0s4k5ra3i6l5lc7kp6ajaqkkyh4c2k5yck1md")) + ("test-generative-src" + ,(lib "test.generative/archive/test.generative-" + "0.5.2" + "1pjafy1i7yblc7ixmcpfq1lfbyf3jaljvkgrajn70sws9xs7a9f8")) + ("tools-namespace-src" + ,(lib "tools.namespace/archive/tools.namespace-" + "0.2.11" + "10baak8v0hnwz2hr33bavshm7y49mmn9zsyyms1dwjz45p5ymhy0")= ))) + (library-names (match libraries + (((library-name _) ...) + library-name)))) (package (name "clojure") (version "1.9.0") @@ -590,27 +618,21 @@ interface.") #:test-target "test" #:phases (modify-phases %standard-phases =2D (add-after 'unpack 'unpack-submodule-sources + (add-after 'unpack 'unpack-library-sources (lambda* (#:key inputs #:allow-other-keys) =2D (for-each =2D (lambda (name) =2D (mkdir-p name) =2D (with-directory-excursion name =2D (invoke "tar" =2D "--extract" =2D "--verbose" =2D "--file" (assoc-ref inputs name) =2D "--strip-components=3D1")) =2D (copy-recursively (string-append name "/src/main/cloju= re/") =2D "src/clj/")) =2D '("core-specs-alpha-src" =2D "data-generators-src" =2D "spec-alpha-src" =2D "test-check-src" =2D "test-generative-src" =2D "tools-namespace-src")) + (define (extract-library name) + (mkdir-p name) + (with-directory-excursion name + (invoke "tar" + "--extract" + "--verbose" + "--file" (assoc-ref inputs name) + "--strip-components=3D1")) + (copy-recursively (string-append name "/src/main/clojure/= ") + "src/clj/")) + (for-each extract-library ',library-names) #t)) =2D (add-after 'unpack 'fix-manifest-classpath + (add-after 'unpack-library-sources 'fix-manifest-classpath (lambda _ (substitute* "build.xml" (("") "")) @@ -643,32 +665,7 @@ interface.") <>) (scandir "./"))) #t)))))) =2D ;; The native-inputs below are needed to run the tests. =2D (native-inputs =2D `(("core-specs-alpha-src" =2D ,(submodule "core.specs.alpha/archive/core.specs.alpha-" =2D "0.1.24" =2D "0v2a0svf1ar2y42ajxwsjr7zmm5j7pp2zwrd2jh3k7xzd1p9x= 1fv")) =2D ("data-generators-src" =2D ,(submodule "data.generators/archive/data.generators-" =2D "0.1.2" =2D "0kki093jp4ckwxzfnw8ylflrfqs8b1i1wi9iapmwcsy328dmg= zp1")) =2D ("spec-alpha-src" =2D ,(submodule "spec.alpha/archive/spec.alpha-" =2D "0.1.143" =2D "00alf0347licdn773w2jarpllyrbl52qz4d8mw61anjksacxy= lzz")) =2D ("test-check-src" =2D ,(submodule "test.check/archive/test.check-" =2D "0.9.0" =2D "0p0mnyhr442bzkz0s4k5ra3i6l5lc7kp6ajaqkkyh4c2k5yck= 1md")) =2D ("test-generative-src" =2D ,(submodule "test.generative/archive/test.generative-" =2D "0.5.2" =2D "1pjafy1i7yblc7ixmcpfq1lfbyf3jaljvkgrajn70sws9xs7a= 9f8")) =2D ("tools-namespace-src" =2D ,(submodule "tools.namespace/archive/tools.namespace-" =2D "0.2.11" =2D "10baak8v0hnwz2hr33bavshm7y49mmn9zsyyms1dwjz45p5ym= hy0")))) + (native-inputs libraries) (home-page "https://clojure.org/") (synopsis "Lisp dialect running on the JVM") (description "Clojure is a dynamic, general-purpose programming lang= uage, @@ -689,7 +686,7 @@ designs.") ;; ASM bytecode manipulation library is licensed under BSD-3 ;; Guava Murmur3 hash implementation is licensed under APL2.0 ;; src/clj/repl.clj is licensed under CPL1.0 =2D ;; + ;; See readme.html or readme.txt for details. (license (list license:epl1.0 license:bsd-3 =2D-=20 2.19.1 --=-=-=-- --==-=-= Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iHUEARYIAB0WIQSof2ZdXkE0FM5aU4XzrkvbI+zaGwUCW9lGmgAKCRDzrkvbI+za G+42AQDI0j2ZU08JZuzEGPQm1Jk1R+sfQBhi5ZAs80VTTIXq5wEAgt9MXU8XGC3O nu9xE2GZt0A6rbBYuvHq2rRLVlGfHgs= =KN/L -----END PGP SIGNATURE----- --==-=-=--