From unknown Sat Jun 14 03:51:13 2025 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-Mailer: MIME-tools 5.509 (Entity 5.509) Content-Type: text/plain; charset=utf-8 From: bug#33215 <33215@debbugs.gnu.org> To: bug#33215 <33215@debbugs.gnu.org> Subject: Status: [PATCH 00/11] build-system: Add 'clojure-build-system'. Reply-To: bug#33215 <33215@debbugs.gnu.org> Date: Sat, 14 Jun 2025 10:51:13 +0000 retitle 33215 [PATCH 00/11] build-system: Add 'clojure-build-system'. reassign 33215 guix-patches submitter 33215 Alex Vong severity 33215 normal tag 33215 patch thanks From debbugs-submit-bounces@debbugs.gnu.org Wed Oct 31 02:03:22 2018 Received: (at submit) by debbugs.gnu.org; 31 Oct 2018 06:03:22 +0000 Received: from localhost ([127.0.0.1]:56158 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1gHjb8-0006WZ-HP for submit@debbugs.gnu.org; Wed, 31 Oct 2018 02:03:22 -0400 Received: from eggs.gnu.org ([208.118.235.92]:46647) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1gHjb6-0006WL-4t for submit@debbugs.gnu.org; Wed, 31 Oct 2018 02:03:20 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1gHjaz-0003vn-Vu for submit@debbugs.gnu.org; Wed, 31 Oct 2018 02:03:14 -0400 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=0.2 required=5.0 tests=BAYES_20, FREEMAIL_ENVFROM_END_DIGIT,FREEMAIL_FROM autolearn=disabled version=3.3.2 Received: from lists.gnu.org ([2001:4830:134:3::11]:42651) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1gHjaz-0003ud-SR for submit@debbugs.gnu.org; Wed, 31 Oct 2018 02:03:13 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:56249) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gHjaz-0001s0-3N for guix-patches@gnu.org; Wed, 31 Oct 2018 02:03:13 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1gHjav-0003iv-16 for guix-patches@gnu.org; Wed, 31 Oct 2018 02:03:13 -0400 Received: from mail-pl1-x644.google.com ([2607:f8b0:4864:20::644]:33178) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1gHjau-0003hv-LB for guix-patches@gnu.org; Wed, 31 Oct 2018 02:03:08 -0400 Received: by mail-pl1-x644.google.com with SMTP id x6-v6so6750481pln.0 for ; Tue, 30 Oct 2018 23:03:08 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:user-agent:mime-version; bh=6XsFFijhr2nZxWnxaUmJ8KbPImlL873XALP4jlGgiK8=; b=pyYsGR3V/xmaNpFVzX0WmD1r/FIoFRi+rtS1YKBfF8CnPEyJ5dQJYKDf+8+qSeRTkr PB02sXtMtEcRJ4X3aUFfrEHUfu9vN8gXlMf2YXGnx6b92QBUogryQ1CdB2kEaN9CFbdg 3FajCNopz0L7qt5/SfUKNQXlaDakgx5mu6TFN7Dys671H0QnnFUkIfCVJ0IVlxtRZwQh WBPpLgHHNt38WGEGxA4BQkwxYmn3wA3mb+8cdfYJlDFC1IbgvOJLhkb5+ywUB95r4oqz tl+QcQe7WarqrbjKuusx/RsfjkctMIm6gTK7r+xGR6NCp0jtYP9gPI82rVqk1qq4N3NJ AwLA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:user-agent :mime-version; bh=6XsFFijhr2nZxWnxaUmJ8KbPImlL873XALP4jlGgiK8=; b=TgS0gfc5PbKRZBiWoUx5pEEenb4uo/4IYCQ+xAed8vyLfgU34xi58w12sontW3N6H3 YsUgYIJeRYxD+JbQ89viPDf4fXUWATGYAE+qfVj2MIs66lmhkmErVOGWoIcAhok4TXN0 WBi5ZqTRf+d6hjIcaaV+u4rQd517LYq0BdR0PDr9G32OKla51cHm8w8vkZWvpoquIpY8 Nw4cio1682EbG2UdRXsgs3jw95Ky5IZ69stldl5cLcutEt3h5XEefMjX9LCK0bSiY9Rs pwStJx8h4mm1y6sUcJmRhdcoLe73oJwT0lqy5ERgnbvkgvcrisbdDeDEqGcY1GQtOwEZ lkDw== X-Gm-Message-State: AGRZ1gJ79XBZLIFnl1SzCK+27X7r2yMTdpl81foC0cqZMXoVdTNg5xe2 uyOG2Y8mJORx4g+09VH/mYbbTATP X-Google-Smtp-Source: AJdET5e2mqiW/zIz5BGuf24Q1+rx5Qx27CT2FGFt1OnsrpTgejEJcmqyxPUNmmZiCeu6BVY+izjNGQ== X-Received: by 2002:a17:902:bc44:: with SMTP id t4-v6mr1881469plz.300.1540965787284; Tue, 30 Oct 2018 23:03:07 -0700 (PDT) Received: from debian (42-3-197-089.static.netvigator.com. [42.3.197.89]) by smtp.gmail.com with ESMTPSA id s2-v6sm61460630pfk.133.2018.10.30.23.03.05 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Tue, 30 Oct 2018 23:03:06 -0700 (PDT) From: Alex Vong To: guix-patches@gnu.org Subject: [PATCH 00/11] build-system: Add 'clojure-build-system'. Date: Wed, 31 Oct 2018 14:02:36 +0800 Message-ID: <87muquhcw3.fsf@gmail.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.1 (gnu/linux) MIME-Version: 1.0 Content-Type: multipart/signed; boundary="=-=-="; micalg=pgp-sha256; protocol="application/pgp-signature" X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x X-Received-From: 2001:4830:134:3::11 X-Spam-Score: -3.8 (---) X-Debbugs-Envelope-To: submit Cc: alexvong1995@gmail.com X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -4.8 (----) --=-=-= Content-Type: text/plain Hello, This patch series adds a simple Clojure build system to guix. It uses plain old 'compile' in Clojure. The patch series does 4 things: 1. Move the 'clojure' package from 'java.scm' to 'lisp.scm' since clojure is a lisp! Also, 'java.scm' is getting large. I don't want to make it even larger by adding new clojure packages. 2. Refactor the 'clojure' package. For example, removing the need to keep 2 lists in sync and factors code into the new 'clojure-utils.scm'. 3. Add 'clojure-build-system' and friends. 4. Add 5 clojure packages to test if everthing works. Cheers, Alex --=-=-= Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iHUEARYIAB0WIQSof2ZdXkE0FM5aU4XzrkvbI+zaGwUCW9lFfAAKCRDzrkvbI+za G9nvAP4ilJb3BgA689mhHmnV9qBM1Cn1sIHyLN/ZFIxVqiDAfQEA+/A0e3hypOw1 dGsmHS7c3ESMFUr2cSDfg99lfJSpUAc= =6vWU -----END PGP SIGNATURE----- --=-=-=-- From debbugs-submit-bounces@debbugs.gnu.org Wed Oct 31 02:05:51 2018 Received: (at 33215) by debbugs.gnu.org; 31 Oct 2018 06:05:51 +0000 Received: from localhost ([127.0.0.1]:56163 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1gHjdW-0006aJ-Vr for submit@debbugs.gnu.org; Wed, 31 Oct 2018 02:05:51 -0400 Received: from mail-pf1-f179.google.com ([209.85.210.179]:45465) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1gHjdU-0006a6-Gu for 33215@debbugs.gnu.org; Wed, 31 Oct 2018 02:05:49 -0400 Received: by mail-pf1-f179.google.com with SMTP id v5-v6so2166079pfm.12 for <33215@debbugs.gnu.org>; Tue, 30 Oct 2018 23:05:48 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:user-agent:mime-version; bh=RKwMRyRsjXVjZa8OyjmAt9PsjQpsrG0WpdzuvPJrMTg=; b=SV3rhNsA0wUWo+9gN8TDOTUDkn6TnmxF/L14Wre4a06MrQETVsmfewqBwMv3WN0Hjj B9xcPANCLU5o+PdWwOL/Q1aKYzj2yxtXfba/b6DWTKmENbPJ4/xayam9CHWluB9ipqLI JsPPVu7YI0unfGeR5yodoSyueI0QleMuMlxsO5lYTtjgNNaXFWTkNX3bh3YhSP1xIlzN 27bAda92pJAlA3JoMrKgl9j6N8p77aoZXz4oEIH8a/WnKXWnYfjgN0A1RYj3PMa6T9uX LVOfHZ8Tmpmnsd3bdpfNZuXxZIbDEipd/DJHIReUGLAaR4Y87qZExzW8K+O0TNG4dAtw gr9g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:user-agent :mime-version; bh=RKwMRyRsjXVjZa8OyjmAt9PsjQpsrG0WpdzuvPJrMTg=; b=VLJ+Dieh743yQTqLl3agSB3ADbx7L653XxosYAIPPW24MKojZpnuN+rtJJiDXexjbq winTa1VniIwFbqg+SaLf9r2IeG3KIgVBgjGbXwLqHEE9WfHt94UA9soITEsTbDHTvwf0 4kfb5owbEmJ8JLfBnTGnV6FDeixbxMQ2RO0kB+emc7Md8N/ZVTE8nXJiS2hUO1348d0n AiVXtFpolRDy+otjdjfc02fXlE3pmP3y5UUJHTp9Xe6Mn9jGIpF8VL2EbImC7Zlo6Htl jfH/6vaWZaBRjsVZ0wPptHz7wlQZicktXjJfj0AwfWVL64vj8emRh7b08rxoZAq3Aih0 jVmA== X-Gm-Message-State: AGRZ1gJ5LQIIPl3GOBNlS//WuHPTJqpIdeE+bP4OGopYORqYAjLu/XIf oD/rCZUoIhej8Bj9tOTIbBU= X-Google-Smtp-Source: AJdET5f3TUvbB+fWvi/v/svwR7JkMjO0m2QTCGuMTKvbfUzidngMNcI/loMWMf0w70dGeTGKp31I3Q== X-Received: by 2002:a63:4c6:: with SMTP id 189mr1808224pge.391.1540965942769; Tue, 30 Oct 2018 23:05:42 -0700 (PDT) Received: from debian (42-3-197-089.static.netvigator.com. [42.3.197.89]) by smtp.gmail.com with ESMTPSA id r81-v6sm59217536pfa.110.2018.10.30.23.05.41 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Tue, 30 Oct 2018 23:05:42 -0700 (PDT) From: Alex Vong To: 33215@debbugs.gnu.org Subject: [PATCH 01/11] gnu: clojure: Move from java to lisp. Date: Wed, 31 Oct 2018 14:05:37 +0800 Message-ID: <87in1ihcr2.fsf@gmail.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.1 (gnu/linux) MIME-Version: 1.0 Content-Type: multipart/signed; boundary="==-=-="; micalg=pgp-sha256; protocol="application/pgp-signature" X-Spam-Score: 0.2 (/) X-Debbugs-Envelope-To: 33215 Cc: alexvong1995@gmail.com X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.8 (/) --==-=-= Content-Type: multipart/mixed; boundary="=-=-=" --=-=-= Content-Type: text/x-diff; charset=utf-8 Content-Disposition: inline; filename=0001-gnu-clojure-Move-from-java-to-lisp.patch Content-Transfer-Encoding: quoted-printable From=2049dd56fa81666077fe50b05e46228c0734201d1c Mon Sep 17 00:00:00 2001 From: Alex Vong Date: Fri, 12 Oct 2018 17:58:00 +0800 Subject: [PATCH 01/11] gnu: clojure: Move from java to lisp. * gnu/packages/java.scm (clojure): Move from here... * gnu/packages/lisp.scm (clojure): ...to here. =2D-- gnu/packages/java.scm | 145 ----------------------------------------- gnu/packages/lisp.scm | 147 ++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 147 insertions(+), 145 deletions(-) diff --git a/gnu/packages/java.scm b/gnu/packages/java.scm index f6d72edee..cea3c4e33 100644 =2D-- a/gnu/packages/java.scm +++ b/gnu/packages/java.scm @@ -1803,151 +1803,6 @@ new Date();")) `(("java-junit" ,java-junit) ,@(package-inputs ant/java8))))) =20 =2D(define-public clojure =2D (let* ((remove-archives '(begin =2D (for-each delete-file =2D (find-files "." ".*\\.(jar|zip)")) =2D #t)) =2D (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)) =2D (modules '((guix build utils))) =2D (snippet remove-archives))))) =2D (package =2D (name "clojure") =2D (version "1.9.0") =2D (source =2D (origin =2D (method url-fetch) =2D (uri =2D (string-append "https://github.com/clojure/clojure/archive/clo= jure-" =2D version ".tar.gz")) =2D (sha256 =2D (base32 "0xjbzcw45z32vsn9pifp7ndysjzqswp5ig0jkjpivigh2ckkdzha"= )) =2D (modules '((guix build utils))) =2D (snippet remove-archives))) =2D (build-system ant-build-system) =2D (arguments =2D `(#:modules ((guix build ant-build-system) =2D (guix build utils) =2D (ice-9 ftw) =2D (ice-9 regex) =2D (srfi srfi-1) =2D (srfi srfi-26)) =2D #:test-target "test" =2D #:phases =2D (modify-phases %standard-phases =2D (add-after 'unpack 'unpack-submodule-sources =2D (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 ;; Use xz for repacked tarball. =2D "--xz" =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")) =2D #t)) =2D (add-after 'unpack 'fix-manifest-classpath =2D (lambda _ =2D (substitute* "build.xml" =2D (("") "= ")) =2D #t)) =2D ;; The javadoc target is not built by default. =2D (add-after 'build 'build-doc =2D (lambda _ =2D (invoke "ant" "javadoc"))) =2D ;; Needed since no install target is provided. =2D (replace 'install =2D (lambda* (#:key outputs #:allow-other-keys) =2D (let ((java-dir (string-append (assoc-ref outputs "out") =2D "/share/java/"))) =2D ;; Install versioned to avoid collisions. =2D (install-file (string-append "clojure-" ,version ".jar") =2D java-dir) =2D #t))) =2D ;; Needed since no install-doc target is provided. =2D (add-after 'install 'install-doc =2D (lambda* (#:key outputs #:allow-other-keys) =2D (let ((doc-dir (string-append (assoc-ref outputs "out") =2D "/share/doc/clojure-" =2D ,version "/"))) =2D (copy-recursively "doc/clojure" doc-dir) =2D (copy-recursively "target/javadoc/" =2D (string-append doc-dir "javadoc/")) =2D (for-each (cut install-file <> doc-dir) =2D (filter (cut string-match =2D ".*\\.(html|markdown|md|txt)" =2D <>) =2D (scandir "./"))) =2D #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")))) =2D (home-page "https://clojure.org/") =2D (synopsis "Lisp dialect running on the JVM") =2D (description "Clojure is a dynamic, general-purpose programming la= nguage, =2Dcombining the approachability and interactive development of a scripting =2Dlanguage with an efficient and robust infrastructure for multithreaded =2Dprogramming. Clojure is a compiled language, yet remains completely dyn= amic =2D=E2=80=93 every feature supported by Clojure is supported at runtime. C= lojure =2Dprovides easy access to the Java frameworks, with optional type hints an= d type =2Dinference, to ensure that calls to Java can avoid reflection. =2D =2DClojure is a dialect of Lisp, and shares with Lisp the code-as-data phil= osophy =2Dand a powerful macro system. Clojure is predominantly a functional prog= ramming =2Dlanguage, and features a rich set of immutable, persistent data structur= es. =2DWhen mutable state is needed, Clojure offers a software transactional me= mory =2Dsystem and reactive Agent system that ensure clean, correct, multithread= ed =2Ddesigns.") =2D ;; Clojure is licensed under EPL1.0 =2D ;; ASM bytecode manipulation library is licensed under BSD-3 =2D ;; Guava Murmur3 hash implementation is licensed under APL2.0 =2D ;; src/clj/repl.clj is licensed under CPL1.0 =2D ;; =2D ;; See readme.html or readme.txt for details. =2D (license (list license:epl1.0 =2D license:bsd-3 =2D license:asl2.0 =2D license:cpl1.0))))) =2D (define-public javacc-4 (package (name "javacc") diff --git a/gnu/packages/lisp.scm b/gnu/packages/lisp.scm index c32380969..93851c1a8 100644 =2D-- a/gnu/packages/lisp.scm +++ b/gnu/packages/lisp.scm @@ -9,6 +9,7 @@ ;;; Copyright =C2=A9 2017, 2018 Efraim Flashner ;;; Copyright =C2=A9 2017 Tobias Geerinckx-Rice ;;; Copyright =C2=A9 2018 Benjamin Slade +;;; Copyright =C2=A9 2018 Alex Vong ;;; ;;; This file is part of GNU Guix. ;;; @@ -34,6 +35,7 @@ #:use-module (guix hg-download) #:use-module (guix utils) #:use-module (guix build-system gnu) + #:use-module (guix build-system ant) #:use-module (guix build-system asdf) #:use-module (guix build-system trivial) #:use-module (gnu packages admin) @@ -559,6 +561,151 @@ interface.") (license (list license:lgpl2.1 license:clarified-artistic)))) ;TRIVIAL-LDAP package =20 +(define-public clojure + (let* ((remove-archives '(begin + (for-each delete-file + (find-files "." ".*\\.(jar|zip)")) + #t)) + (submodule (lambda (prefix version hash) + (origin + (method url-fetch) + (uri (string-append "https://github.com/clojure/" + prefix version ".tar.gz")) + (sha256 (base32 hash)) + (modules '((guix build utils))) + (snippet remove-archives))))) + (package + (name "clojure") + (version "1.9.0") + (source + (origin + (method url-fetch) + (uri + (string-append "https://github.com/clojure/clojure/archive/cloju= re-" + version ".tar.gz")) + (sha256 + (base32 "0xjbzcw45z32vsn9pifp7ndysjzqswp5ig0jkjpivigh2ckkdzha")) + (modules '((guix build utils))) + (snippet remove-archives))) + (build-system ant-build-system) + (arguments + `(#:modules ((guix build ant-build-system) + (guix build utils) + (ice-9 ftw) + (ice-9 regex) + (srfi srfi-1) + (srfi srfi-26)) + #:test-target "test" + #:phases + (modify-phases %standard-phases + (add-after 'unpack 'unpack-submodule-sources + (lambda* (#:key inputs #:allow-other-keys) + (for-each + (lambda (name) + (mkdir-p name) + (with-directory-excursion name + (invoke "tar" + ;; Use xz for repacked tarball. + "--xz" + "--extract" + "--verbose" + "--file" (assoc-ref inputs name) + "--strip-components=3D1")) + (copy-recursively (string-append name "/src/main/clojure= /") + "src/clj/")) + '("core-specs-alpha-src" + "data-generators-src" + "spec-alpha-src" + "test-check-src" + "test-generative-src" + "tools-namespace-src")) + #t)) + (add-after 'unpack 'fix-manifest-classpath + (lambda _ + (substitute* "build.xml" + (("") "")) + #t)) + ;; The javadoc target is not built by default. + (add-after 'build 'build-doc + (lambda _ + (invoke "ant" "javadoc"))) + ;; Needed since no install target is provided. + (replace 'install + (lambda* (#:key outputs #:allow-other-keys) + (let ((java-dir (string-append (assoc-ref outputs "out") + "/share/java/"))) + ;; Install versioned to avoid collisions. + (install-file (string-append "clojure-" ,version ".jar") + java-dir) + #t))) + ;; Needed since no install-doc target is provided. + (add-after 'install 'install-doc + (lambda* (#:key outputs #:allow-other-keys) + (let ((doc-dir (string-append (assoc-ref outputs "out") + "/share/doc/clojure-" + ,version "/"))) + (copy-recursively "doc/clojure" doc-dir) + (copy-recursively "target/javadoc/" + (string-append doc-dir "javadoc/")) + (for-each (cut install-file <> doc-dir) + (filter (cut string-match + ".*\\.(html|markdown|md|txt)" + <>) + (scandir "./"))) + #t)))))) + ;; The native-inputs below are needed to run the tests. + (native-inputs + `(("core-specs-alpha-src" + ,(submodule "core.specs.alpha/archive/core.specs.alpha-" + "0.1.24" + "0v2a0svf1ar2y42ajxwsjr7zmm5j7pp2zwrd2jh3k7xzd1p9x1f= v")) + ("data-generators-src" + ,(submodule "data.generators/archive/data.generators-" + "0.1.2" + "0kki093jp4ckwxzfnw8ylflrfqs8b1i1wi9iapmwcsy328dmgzp= 1")) + ("spec-alpha-src" + ,(submodule "spec.alpha/archive/spec.alpha-" + "0.1.143" + "00alf0347licdn773w2jarpllyrbl52qz4d8mw61anjksacxylz= z")) + ("test-check-src" + ,(submodule "test.check/archive/test.check-" + "0.9.0" + "0p0mnyhr442bzkz0s4k5ra3i6l5lc7kp6ajaqkkyh4c2k5yck1m= d")) + ("test-generative-src" + ,(submodule "test.generative/archive/test.generative-" + "0.5.2" + "1pjafy1i7yblc7ixmcpfq1lfbyf3jaljvkgrajn70sws9xs7a9f= 8")) + ("tools-namespace-src" + ,(submodule "tools.namespace/archive/tools.namespace-" + "0.2.11" + "10baak8v0hnwz2hr33bavshm7y49mmn9zsyyms1dwjz45p5ymhy= 0")))) + (home-page "https://clojure.org/") + (synopsis "Lisp dialect running on the JVM") + (description "Clojure is a dynamic, general-purpose programming lang= uage, +combining the approachability and interactive development of a scripting +language with an efficient and robust infrastructure for multithreaded +programming. Clojure is a compiled language, yet remains completely dynam= ic +=E2=80=93 every feature supported by Clojure is supported at runtime. Clo= jure +provides easy access to the Java frameworks, with optional type hints and = type +inference, to ensure that calls to Java can avoid reflection. + +Clojure is a dialect of Lisp, and shares with Lisp the code-as-data philos= ophy +and a powerful macro system. Clojure is predominantly a functional progra= mming +language, and features a rich set of immutable, persistent data structures. +When mutable state is needed, Clojure offers a software transactional memo= ry +system and reactive Agent system that ensure clean, correct, multithreaded +designs.") + ;; Clojure is licensed under EPL1.0 + ;; 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 + ;; + ;; See readme.html or readme.txt for details. + (license (list license:epl1.0 + license:bsd-3 + license:asl2.0 + license:cpl1.0))))) + (define-public femtolisp (let ((commit "68c5b1225572ecf2c52baf62f928063e5a30511b") (revision "1")) =2D-=20 2.19.1 --=-=-=-- --==-=-= Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iHUEARYIAB0WIQSof2ZdXkE0FM5aU4XzrkvbI+zaGwUCW9lGMQAKCRDzrkvbI+za GwqBAP0a8bW+QFAagvJfcYqeM4sfp3wpzLOOrmTFYsrsmFMfkAD8CFHTcJGwohTy lYhqlj3aWiwzonNlyc4jZdBc0r4/jAA= =Sk1I -----END PGP SIGNATURE----- --==-=-=-- From debbugs-submit-bounces@debbugs.gnu.org Wed Oct 31 02:06:50 2018 Received: (at 33215) by debbugs.gnu.org; 31 Oct 2018 06:06:51 +0000 Received: from localhost ([127.0.0.1]:56167 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1gHjeU-0006bv-NB for submit@debbugs.gnu.org; Wed, 31 Oct 2018 02:06:50 -0400 Received: from mail-pl1-f174.google.com ([209.85.214.174]:39628) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1gHjeS-0006bi-RR for 33215@debbugs.gnu.org; Wed, 31 Oct 2018 02:06:49 -0400 Received: by mail-pl1-f174.google.com with SMTP id b5-v6so6124571pla.6 for <33215@debbugs.gnu.org>; Tue, 30 Oct 2018 23:06:48 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:user-agent:mime-version; bh=Pi/3kXwKtUGl/lQ4LDOlqkevXx1fqNmfeoW4HYv+oBI=; b=PgxBnmLEGmROyeDhN4ePJ6urgqXpxLuCX3Yl7fdWYqtfxKp3+sdU89WRHPmr84kApS FbcEcTh+4JRZ70XhcCDsHzorVG14RHNAgz+YUEzF7sNRYxANDdsWKuio3QFnEr9uZmAR ITpGLBDB18bGzPSfnIpx15QSUSGUJwlY/caDBiCgKt4ecR2etYhy3WWGgunfe3Hq2e+3 z1TfiX6q1UdP1TqO9zAc5hHE77qQgcvKusKXqGVYJ3yvyrrLB//Ebu1kCWWCTKAFmAEn +GZt/pR5Y2n0PhQ9SWmN70s2D4vAosAQCpj8EGbR2N6a8K0TXyUVjeR5433BQ5FcHLHb TcCw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:user-agent :mime-version; bh=Pi/3kXwKtUGl/lQ4LDOlqkevXx1fqNmfeoW4HYv+oBI=; b=smSJcA8mlOqMn9iPIUxqFiaoHoGQDjjvapaeL1M8aSRirog90qDR0TN2jec926Vzvc WP1EfpSwpTd+HQugDiajrC4RjXjjeGhAtox7+ePWd2CxwhcTq03DADsrO6bWMQl31iUw +qpCh9Wa2CzdndAwujipQhRoAz5LbTN5U9th5fQTXeCwClANs1Q/NjnnaIRLqFDwUeWN vYhWHhIGKdGyxxmZa3No5Xeu5/+yl+MQHzJBWya8ikV7fFxhQ6c/P3KutMexASpFBW+p QnWooBnoXPhvtO6UiF3J68TXWaaW65K2hrIiPEUv4SH7rG9lWESIsCLrlwDSGfXMvzhJ OLeA== X-Gm-Message-State: AGRZ1gJhDG5ODF+MaboN/oea/UH7t4a3DdijYHmJcKwRfzOPNuLaiHtb mFTpTdUcLwq008gLsVL2/5Q= X-Google-Smtp-Source: AJdET5fkePfpwQam+6Qd1ozsMe8tSpKOnoF3PlP5WE6vbJpzibwEwvlwQlKOn0AtzDG7xLK15ZBosQ== X-Received: by 2002:a17:902:ab:: with SMTP id a40-v6mr1914839pla.201.1540966003222; Tue, 30 Oct 2018 23:06:43 -0700 (PDT) Received: from debian (42-3-197-089.static.netvigator.com. [42.3.197.89]) by smtp.gmail.com with ESMTPSA id r76-v6sm48205672pgr.11.2018.10.30.23.06.41 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Tue, 30 Oct 2018 23:06:42 -0700 (PDT) From: Alex Vong To: 33215@debbugs.gnu.org Subject: [PATCH 02/11] gnu: clojure: Remove 'remove-archives' snippet. Date: Wed, 31 Oct 2018 14:06:35 +0800 Message-ID: <87efc6hcpg.fsf@gmail.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.1 (gnu/linux) MIME-Version: 1.0 Content-Type: multipart/signed; boundary="==-=-="; micalg=pgp-sha256; protocol="application/pgp-signature" X-Spam-Score: 0.2 (/) X-Debbugs-Envelope-To: 33215 Cc: alexvong1995@gmail.com X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.8 (/) --==-=-= Content-Type: multipart/mixed; boundary="=-=-=" --=-=-= Content-Type: text/x-diff Content-Disposition: inline; filename=0002-gnu-clojure-Remove-remove-archives-snippet.patch Content-Transfer-Encoding: quoted-printable From=20aade1b3a84bc1e2cb6ad46b477025cb14daa6080 Mon Sep 17 00:00:00 2001 From: Alex Vong Date: Sat, 13 Oct 2018 18:32:14 +0800 Subject: [PATCH 02/11] gnu: clojure: Remove 'remove-archives' snippet. This is no longer needed since clojure now makes official source releases in github. * gnu/packages/lisp.scm (clojure)[source]: Remove it. [native-inputs]: Remove it in 'submodule'. [arguments]: Adjust 'unpack-submodule-sources' phase accordingly. =2D-- gnu/packages/lisp.scm | 24 +++++++----------------- 1 file changed, 7 insertions(+), 17 deletions(-) diff --git a/gnu/packages/lisp.scm b/gnu/packages/lisp.scm index 93851c1a8..df0c0a87e 100644 =2D-- a/gnu/packages/lisp.scm +++ b/gnu/packages/lisp.scm @@ -562,18 +562,12 @@ interface.") license:clarified-artistic)))) ;TRIVIAL-LDAP package =20 (define-public clojure =2D (let* ((remove-archives '(begin =2D (for-each delete-file =2D (find-files "." ".*\\.(jar|zip)")) =2D #t)) =2D (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)) =2D (modules '((guix build utils))) =2D (snippet remove-archives))))) + (let ((submodule (lambda (prefix version hash) + (origin + (method url-fetch) + (uri (string-append "https://github.com/clojure/" + prefix version ".tar.gz")) + (sha256 (base32 hash)))))) (package (name "clojure") (version "1.9.0") @@ -584,9 +578,7 @@ interface.") (string-append "https://github.com/clojure/clojure/archive/cloju= re-" version ".tar.gz")) (sha256 =2D (base32 "0xjbzcw45z32vsn9pifp7ndysjzqswp5ig0jkjpivigh2ckkdzha"= )) =2D (modules '((guix build utils))) =2D (snippet remove-archives))) + (base32 "0xjbzcw45z32vsn9pifp7ndysjzqswp5ig0jkjpivigh2ckkdzha"))= )) (build-system ant-build-system) (arguments `(#:modules ((guix build ant-build-system) @@ -605,8 +597,6 @@ interface.") (mkdir-p name) (with-directory-excursion name (invoke "tar" =2D ;; Use xz for repacked tarball. =2D "--xz" "--extract" "--verbose" "--file" (assoc-ref inputs name) =2D-=20 2.19.1 --=-=-=-- --==-=-= Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iHUEARYIAB0WIQSof2ZdXkE0FM5aU4XzrkvbI+zaGwUCW9lGawAKCRDzrkvbI+za G9v/AP9+YJCuDZEsO49A5MBDeVyEEoUvPIu4ErCRGzZfLngL9AEA+XkAwSxc7udP s73DtY3nWSDc+db7URDoqoj6XUHQ8Q0= =6W3A -----END PGP SIGNATURE----- --==-=-=-- From debbugs-submit-bounces@debbugs.gnu.org Wed Oct 31 02:07:37 2018 Received: (at 33215) by debbugs.gnu.org; 31 Oct 2018 06:07:37 +0000 Received: from localhost ([127.0.0.1]:56171 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1gHjfF-0006dK-1A for submit@debbugs.gnu.org; Wed, 31 Oct 2018 02:07:37 -0400 Received: from mail-pg1-f182.google.com ([209.85.215.182]:43368) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1gHjfA-0006d2-Jz for 33215@debbugs.gnu.org; Wed, 31 Oct 2018 02:07:33 -0400 Received: by mail-pg1-f182.google.com with SMTP id n10-v6so6837867pgv.10 for <33215@debbugs.gnu.org>; Tue, 30 Oct 2018 23:07:32 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:user-agent:mime-version; bh=EkQPLgPCEEdAN9dH+3GcRSjcFpj8X1+296BhdKgmugM=; b=DNTzLHQ1FUjv4bDnv7V8sHoZrVEZ6rrW60c7dnLWnBXDRK/utv/B0sI9f7jk5lcR2o ef9nWZCXCWnIg7SU/R1trIA/+Y2fl2bS2AM9pcErq6h85wLDY8kvDhrwwN1DErAptQZO ZOS95chUnnspfnzvObuGFdPQHxH495MWmcFrGSzoQyRbB/E+GFVY3LWp6+ORRfTGF0ln hL252Og8kvIawODIpsJJDmSJtAhhQJ8GhiSExOPtQFJjbe/p0QcjxEIoEPzyRShmnN6s +wfGEPqqxoRt6f91Jt6OHHZVQga4MDGb96jEvdSoPyeKJldSfQXxUvuKXFlYHqQ0zVtF xO3A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:user-agent :mime-version; bh=EkQPLgPCEEdAN9dH+3GcRSjcFpj8X1+296BhdKgmugM=; b=oTuRYrmva2n9BqcTEmDP0qKLYF2OVPVG9/ymLIS7kfDegPGpq3IScftlugfKVklavS 2cS1bGkSBiryynEByrT56WqFQI1ORI5/B6Phz7XounJjvbQrmAWiCWK5xSzh66cjZ/yP j0a/Kf0w1fQ6hTJ/w0vU7iEF+d2t9ei4REZcndREUvT6tu3Xdj76nHwfUtGk/l8xLSr5 /S1Po6U49h4uhDJPNoN5aW/RubRUQsvlFe4ZEuscXeB+dDZ2W5kifHOGGSIsR0aEU19+ 1kvs1AhTrQs8sKJ4N1rmxZ0LTWA/xOyFelBCuBCdg3AmZTTnRVl4CbAmBR+HZiOAMFuV cH6g== X-Gm-Message-State: AGRZ1gIesmz7l+tqfS1PxdTsCelt+nR+pcNTAtAMdAlVOPc7ErECBRns Qv2xrryQICIZ9QCVPrwM8GwHvNfx X-Google-Smtp-Source: AJdET5eWdk6NUs9rttoProLzxSSAuuVsojHZzttLwrKqRSFU45ixW9Y5w/aK3dcbqQg33wTmfCpcRA== X-Received: by 2002:a63:2ad4:: with SMTP id q203-v6mr1795129pgq.356.1540966047046; Tue, 30 Oct 2018 23:07:27 -0700 (PDT) Received: from debian (42-3-197-089.static.netvigator.com. [42.3.197.89]) by smtp.gmail.com with ESMTPSA id b77-v6sm11475199pfm.3.2018.10.30.23.07.25 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Tue, 30 Oct 2018 23:07:26 -0700 (PDT) From: Alex Vong To: 33215@debbugs.gnu.org Subject: [PATCH 03/11] gnu: clojure: Refactor to ensure there's a single list of libraries. Date: Wed, 31 Oct 2018 14:07:22 +0800 Message-ID: <87a7muhco5.fsf@gmail.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.1 (gnu/linux) MIME-Version: 1.0 Content-Type: multipart/signed; boundary="==-=-="; micalg=pgp-sha256; protocol="application/pgp-signature" X-Spam-Score: 0.2 (/) X-Debbugs-Envelope-To: 33215 Cc: alexvong1995@gmail.com X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.8 (/) --==-=-= 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----- --==-=-=-- From debbugs-submit-bounces@debbugs.gnu.org Wed Oct 31 02:08:50 2018 Received: (at 33215) by debbugs.gnu.org; 31 Oct 2018 06:08:50 +0000 Received: from localhost ([127.0.0.1]:56175 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1gHjgQ-0006f7-Gc for submit@debbugs.gnu.org; Wed, 31 Oct 2018 02:08:50 -0400 Received: from mail-pg1-f174.google.com ([209.85.215.174]:37525) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1gHjgO-0006es-6s for 33215@debbugs.gnu.org; Wed, 31 Oct 2018 02:08:48 -0400 Received: by mail-pg1-f174.google.com with SMTP id c10-v6so6856397pgq.4 for <33215@debbugs.gnu.org>; Tue, 30 Oct 2018 23:08:48 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:user-agent:mime-version; bh=Myoes63JRax0bjnOFcYxw8TiWxX/nlQtTEA+v8u9ciQ=; b=fNSSAIlYRHBGxT/lFrswc8XMZS1lZX7SW5s/mltKso1o+mlu3ceppoEUysMmqN6bAa a74UeLonIA+kWYMsZkB3zwNbZtOorwKD07Kws0FfD/SbIyonIFlOc1ciYO2NIhZbsriJ naw89NKg7nc6hyrDSU183TkG/b9Zczpp/b4dcZZ1jD6mI4+dfbeuBcLbuzb4ZO7yip2l As9LMo8QRnXsAU8caHaSAeqVp6MrX2hs4yYhzNkyZY6E/81CpCGLzrjC83lgRjQUZryB qORoQJxe4UIe22uZXEq2hw3raiI41T5+QtPun/3C6krqugAqcSoNB+UKh/pkJJ9Ul/Pr tseQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:user-agent :mime-version; bh=Myoes63JRax0bjnOFcYxw8TiWxX/nlQtTEA+v8u9ciQ=; b=Yynt+mzlaM6PfQnaO8ypXB9kUCy2tfeMzubkM+a/Fj08S1AvpTFh4aATUNmxF6PeQW dCtbc8gennPatcFno+A6lR5c4R6qF15oJXVCy/NRJBROQtdRHsSvYpDndsopKc6AKREL m4TBfQ0C5FrhpPN8yQ/TNURlnEU7iFSdbtMnAYprdW/Cifobng9axX6d6f1uYmGb+r6K syGYpCBGg0nGj3mVKkSASoj65R5W9TpD6cZdqn3eK5aN4MkPFytV5/Upz51Br2ZFsNKL 9qj7Vikzg4n/oy0/r0mPJsq/s5LA6deq1mkpIJe3ogk0QPcBYF+IDpzCvIjrFFhMTa7y iwqA== X-Gm-Message-State: AGRZ1gIYRbROMZqgEiFYDYA+2HOek3wrE7JpZTYRm/qh2ZCk15gerFim mW5mLaXReVFIRNIknOQNI30LB6O1 X-Google-Smtp-Source: AJdET5eMdSImkmMfFmlUH+nVMCNVPIk1t0HF/dS8xMmUdW4Bscs2zWGEzzAx66U/jfawpwx84eSPIQ== X-Received: by 2002:a62:d206:: with SMTP id c6-v6mr1923848pfg.143.1540966122739; Tue, 30 Oct 2018 23:08:42 -0700 (PDT) Received: from debian (42-3-197-089.static.netvigator.com. [42.3.197.89]) by smtp.gmail.com with ESMTPSA id m18-v6sm32370934pfk.149.2018.10.30.23.08.41 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Tue, 30 Oct 2018 23:08:42 -0700 (PDT) From: Alex Vong To: 33215@debbugs.gnu.org Subject: [PATCH 04/11] gnu: clojure: Use (guix build java-utils) to simplify build phases. Date: Wed, 31 Oct 2018 14:08:38 +0800 Message-ID: <875zxihcm1.fsf@gmail.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.1 (gnu/linux) MIME-Version: 1.0 Content-Type: multipart/signed; boundary="==-=-="; micalg=pgp-sha256; protocol="application/pgp-signature" X-Spam-Score: 0.2 (/) X-Debbugs-Envelope-To: 33215 Cc: alexvong1995@gmail.com X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.8 (/) --==-=-= Content-Type: multipart/mixed; boundary="=-=-=" --=-=-= Content-Type: text/x-diff Content-Disposition: inline; filename=0004-gnu-clojure-Use-guix-build-java-utils-to-simplify-bu.patch Content-Transfer-Encoding: quoted-printable From=2029b927ed0fc2ed932c37e1fb188e35e300fc3aeb Mon Sep 17 00:00:00 2001 From: Alex Vong Date: Sun, 14 Oct 2018 02:52:41 +0800 Subject: [PATCH 04/11] gnu: clojure: Use (guix build java-utils) to simplify build phases. * gnu/packages/lisp.scm (clojure)[arguments]: Use 'ant-build-javadoc', 'install-jars' and 'install-javadoc' in build phases. =2D-- gnu/packages/lisp.scm | 24 ++++++------------------ 1 file changed, 6 insertions(+), 18 deletions(-) diff --git a/gnu/packages/lisp.scm b/gnu/packages/lisp.scm index c42878fd3..c451aa4c1 100644 =2D-- a/gnu/packages/lisp.scm +++ b/gnu/packages/lisp.scm @@ -610,10 +610,10 @@ interface.") (build-system ant-build-system) (arguments `(#:modules ((guix build ant-build-system) + (guix build java-utils) (guix build utils) (ice-9 ftw) (ice-9 regex) =2D (srfi srfi-1) (srfi srfi-26)) #:test-target "test" #:phases @@ -637,34 +637,22 @@ interface.") (substitute* "build.xml" (("") "")) #t)) =2D ;; The javadoc target is not built by default. =2D (add-after 'build 'build-doc =2D (lambda _ =2D (invoke "ant" "javadoc"))) =2D ;; Needed since no install target is provided. =2D (replace 'install =2D (lambda* (#:key outputs #:allow-other-keys) =2D (let ((java-dir (string-append (assoc-ref outputs "out") =2D "/share/java/"))) =2D ;; Install versioned to avoid collisions. =2D (install-file (string-append "clojure-" ,version ".jar") =2D java-dir) =2D #t))) =2D ;; Needed since no install-doc target is provided. + (add-after 'build 'build-javadoc ant-build-javadoc) + (replace 'install (install-jars "./")) (add-after 'install 'install-doc (lambda* (#:key outputs #:allow-other-keys) (let ((doc-dir (string-append (assoc-ref outputs "out") "/share/doc/clojure-" ,version "/"))) (copy-recursively "doc/clojure" doc-dir) =2D (copy-recursively "target/javadoc/" =2D (string-append doc-dir "javadoc/")) (for-each (cut install-file <> doc-dir) (filter (cut string-match ".*\\.(html|markdown|md|txt)" <>) (scandir "./"))) =2D #t)))))) + #t))) + (add-after 'install-doc 'install-javadoc + (install-javadoc "target/javadoc/"))))) (native-inputs libraries) (home-page "https://clojure.org/") (synopsis "Lisp dialect running on the JVM") =2D-=20 2.19.1 --=-=-=-- --==-=-= Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iHUEARYIAB0WIQSof2ZdXkE0FM5aU4XzrkvbI+zaGwUCW9lG5gAKCRDzrkvbI+za GzhaAP44eidO0V6ERFt/dZlzFEU+lqDa4vyX8pFqoiQveFsmwAEAz322DsSzsEyv kGNuGBYnXXXLCs+uJAz/nZ7zRCkHPAo= =RFuP -----END PGP SIGNATURE----- --==-=-=-- From debbugs-submit-bounces@debbugs.gnu.org Wed Oct 31 02:10:02 2018 Received: (at 33215) by debbugs.gnu.org; 31 Oct 2018 06:10:03 +0000 Received: from localhost ([127.0.0.1]:56180 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1gHjhZ-0006hA-Ty for submit@debbugs.gnu.org; Wed, 31 Oct 2018 02:10:02 -0400 Received: from mail-pf1-f181.google.com ([209.85.210.181]:34415) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1gHjhX-0006gm-QY for 33215@debbugs.gnu.org; Wed, 31 Oct 2018 02:10:00 -0400 Received: by mail-pf1-f181.google.com with SMTP id f78-v6so7089375pfe.1 for <33215@debbugs.gnu.org>; Tue, 30 Oct 2018 23:09:59 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:user-agent:mime-version; bh=Kd6947j+CsYUmJV1durd0JVj37sg7sOyURDayNTTcV4=; b=gMeeFYRmIysDFwJJJ/H/XTw53gmVyNg7dM6eVz3Lm+zusWyDhsCzzmGnqevsI+wkgz LR/WUC6Aq9ZDPXT/NNyLASrnsOqr1yH6tPm9C1xQs/yv05tjE1OLK5uld2umsPwV7qWx bSYC5UA+D+uGfmYMG0ZLdKEOC4YADvICWF1wacCZ7xrMRfMGd4n8fIWWZFpeR0TqGZlx IBz7NuOit4FUH/Y+7n0MAhPVmfQmCeyqa12dTwiLvzs8l0newdVsTcr3QMf8R6moVmOk 0emGrNYx3WgDbHRv/pga5TIzNedbMRgTvrishTGXnHRXk7T8a7/Jwr6WoTo5PxTX+oMs WUvA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:user-agent :mime-version; bh=Kd6947j+CsYUmJV1durd0JVj37sg7sOyURDayNTTcV4=; b=h/ljzVxUDtgyW+WJZyPsfkuMXEbzBI9F2QZeSXFGWpLKN6MXxvVb9ko4exjpLsGS8u TKlkRStay8YdWM+vHD/iWhBueOM277Q+eizQbblG6yGTXfCfguQlAwVUxW+/WtTKTl4S IkY+sSF4fyeE3xpW5GoQeZZ/eVK1C2kmSzmZkVZKWU6jHUvrFP1dqAtKUlbu9m+/Wk56 fEnMvDowHFZkkvSQ7M1K4POcBsq71W7jWXmd8e0pHUc1yej/WIotIVuCsHxXtS447o3A 7jVB+CpVHiZIyWEHy1pkud7n1Pl/nBfAgNgW1L0BflDdPFH82Nkt48yNLKKwEsyOHxVv tLuQ== X-Gm-Message-State: AGRZ1gL5pJc9nHCUFRxkwsloulKnAugaHRvW1uq8tq9TkePVpi7oVSiv 7IF28x14qq7+ARpV2TZRgyY= X-Google-Smtp-Source: AJdET5eGlp3odc5evSkAr2baefB0cle4+L5iOWLZs4WJzzBSbhJDwYS2c3qyLALeKZOcqO95GzuCqg== X-Received: by 2002:a62:cd47:: with SMTP id o68-v6mr1989224pfg.12.1540966194312; Tue, 30 Oct 2018 23:09:54 -0700 (PDT) Received: from debian (42-3-197-089.static.netvigator.com. [42.3.197.89]) by smtp.gmail.com with ESMTPSA id j5-v6sm29148882pgm.79.2018.10.30.23.09.52 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Tue, 30 Oct 2018 23:09:53 -0700 (PDT) From: Alex Vong To: 33215@debbugs.gnu.org Subject: [PATCH 05/11] guix: Add clojure-utils. Date: Wed, 31 Oct 2018 14:09:50 +0800 Message-ID: <871s86hck1.fsf@gmail.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.1 (gnu/linux) MIME-Version: 1.0 Content-Type: multipart/signed; boundary="==-=-="; micalg=pgp-sha256; protocol="application/pgp-signature" X-Spam-Score: 0.2 (/) X-Debbugs-Envelope-To: 33215 Cc: alexvong1995@gmail.com X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.8 (/) --==-=-= Content-Type: multipart/mixed; boundary="=-=-=" --=-=-= Content-Type: text/x-diff; charset=utf-8 Content-Disposition: inline; filename=0005-guix-Add-clojure-utils.patch Content-Transfer-Encoding: quoted-printable From=20857cce37325f01c26f79a6e15e33d7988ea4a0a2 Mon Sep 17 00:00:00 2001 From: Alex Vong Date: Sun, 14 Oct 2018 03:09:48 +0800 Subject: [PATCH 05/11] guix: Add clojure-utils. * guix/build/clojure-utils.scm: New file. * gnu/packages/lisp.scm (clojure)[arguments]: Use it. * Makefile.am (MODULES): Add it. =2D-- Makefile.am | 2 ++ gnu/packages/lisp.scm | 23 +++++-------- guix/build/clojure-utils.scm | 65 ++++++++++++++++++++++++++++++++++++ 3 files changed, 75 insertions(+), 15 deletions(-) create mode 100644 guix/build/clojure-utils.scm diff --git a/Makefile.am b/Makefile.am index 8c3df8f39..e2bc4d369 100644 =2D-- a/Makefile.am +++ b/Makefile.am @@ -12,6 +12,7 @@ # Copyright =C2=A9 2018 Nils Gillmann # Copyright =C2=A9 2018 Julien Lepiller # Copyright =C2=A9 2018 Oleg Pykhalov +# Copyright =C2=A9 2018 Alex Vong # # This file is part of GNU Guix. # @@ -172,6 +173,7 @@ MODULES =3D \ guix/build/syscalls.scm \ guix/build/gremlin.scm \ guix/build/debug-link.scm \ + guix/build/clojure-utils.scm \ guix/build/emacs-utils.scm \ guix/build/java-utils.scm \ guix/build/lisp-utils.scm \ diff --git a/gnu/packages/lisp.scm b/gnu/packages/lisp.scm index c451aa4c1..ee43e5abf 100644 =2D-- a/gnu/packages/lisp.scm +++ b/gnu/packages/lisp.scm @@ -596,6 +596,7 @@ interface.") (library-names (match libraries (((library-name _) ...) library-name)))) + (package (name "clojure") (version "1.9.0") @@ -609,11 +610,13 @@ interface.") (base32 "0xjbzcw45z32vsn9pifp7ndysjzqswp5ig0jkjpivigh2ckkdzha"))= )) (build-system ant-build-system) (arguments =2D `(#:modules ((guix build ant-build-system) + `(#:imported-modules ((guix build clojure-utils) + (guix build guile-build-system) + ,@%ant-build-system-modules) + #:modules ((guix build ant-build-system) + (guix build clojure-utils) (guix build java-utils) (guix build utils) =2D (ice-9 ftw) =2D (ice-9 regex) (srfi srfi-26)) #:test-target "test" #:phases @@ -639,18 +642,8 @@ interface.") #t)) (add-after 'build 'build-javadoc ant-build-javadoc) (replace 'install (install-jars "./")) =2D (add-after 'install 'install-doc =2D (lambda* (#:key outputs #:allow-other-keys) =2D (let ((doc-dir (string-append (assoc-ref outputs "out") =2D "/share/doc/clojure-" =2D ,version "/"))) =2D (copy-recursively "doc/clojure" doc-dir) =2D (for-each (cut install-file <> doc-dir) =2D (filter (cut string-match =2D ".*\\.(html|markdown|md|txt)" =2D <>) =2D (scandir "./"))) =2D #t))) + (add-after 'install-license-files 'install-doc + (cut install-doc #:doc-dirs '("doc/clojure/") <...>)) (add-after 'install-doc 'install-javadoc (install-javadoc "target/javadoc/"))))) (native-inputs libraries) diff --git a/guix/build/clojure-utils.scm b/guix/build/clojure-utils.scm new file mode 100644 index 000000000..713dff2d8 =2D-- /dev/null +++ b/guix/build/clojure-utils.scm @@ -0,0 +1,65 @@ +;;; GNU Guix --- Functional package management for GNU +;;; Copyright =C2=A9 2018 Alex Vong +;;; +;;; This file is part of GNU Guix. +;;; +;;; GNU Guix is free software; you can redistribute it and/or modify it +;;; under the terms of the GNU General Public License as published by +;;; the Free Software Foundation; either version 3 of the License, or (at +;;; your option) any later version. +;;; +;;; GNU Guix is distributed in the hope that it will be useful, but +;;; WITHOUT ANY WARRANTY; without even the implied warranty of +;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +;;; GNU General Public License for more details. +;;; +;;; You should have received a copy of the GNU General Public License +;;; along with GNU Guix. If not, see . + +(define-module (guix build clojure-utils) + #:use-module (guix build utils) + #:use-module (ice-9 ftw) + #:use-module (ice-9 regex) + #:use-module (srfi srfi-1) + #:use-module (srfi srfi-26) + #:export (%clojure-regex + define-with-docs + install-doc)) + +(define-syntax-rule (define-with-docs name docs val) + "Create top-level variable named NAME with doc string DOCS and value VAL= ." + (begin (define name val) + (set-object-property! name 'documentation docs))) + +(define-with-docs %doc-regex + "Default regex for matching the base name of top-level documentation fil= es." + (format #f + "(~a)|(\\.(html|markdown|md|txt)$)" + (@@ (guix build guile-build-system) + %documentation-file-regexp))) + +(define* (install-doc #:key + doc-dirs + (doc-regex %doc-regex) + outputs + #:allow-other-keys) + "Install the following to the default documentation directory: + +1. Top-level files with base name matching DOC-REGEX. +2. All files (recursively) inside DOC-DIRS. + +DOC-REGEX can be compiled or uncompiled." + (let* ((out (assoc-ref outputs "out")) + (doc (assoc-ref outputs "doc")) + (name-ver (strip-store-file-name out)) + (dest-dir (string-append (or doc out) "/share/doc/" name-ver "/")) + (doc-regex* (if (string? doc-regex) + (make-regexp doc-regex) + doc-regex))) + (for-each (cut install-file <> dest-dir) + (remove (compose file-exists? + (cut string-append dest-dir <>)) + (scandir "./" (cut regexp-exec doc-regex* <>)))) + (for-each (cut copy-recursively <> dest-dir) + doc-dirs) + #t)) =2D-=20 2.19.1 --=-=-=-- --==-=-= Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iHUEARYIAB0WIQSof2ZdXkE0FM5aU4XzrkvbI+zaGwUCW9lHLgAKCRDzrkvbI+za G3+zAQCqyE2HY/IS0uyjVg0kSQRo794Sui3F1rOjM4+0RfTE7gD/SWWaFJBDxpTO QxZnbiUPxYe5KvPIkClkKHl/or0bSwE= =IgVB -----END PGP SIGNATURE----- --==-=-=-- From debbugs-submit-bounces@debbugs.gnu.org Wed Oct 31 02:10:39 2018 Received: (at 33215) by debbugs.gnu.org; 31 Oct 2018 06:10:40 +0000 Received: from localhost ([127.0.0.1]:56183 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1gHjiA-0006iG-SF for submit@debbugs.gnu.org; Wed, 31 Oct 2018 02:10:39 -0400 Received: from mail-pl1-f178.google.com ([209.85.214.178]:32923) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1gHji8-0006i2-Bv for 33215@debbugs.gnu.org; Wed, 31 Oct 2018 02:10:37 -0400 Received: by mail-pl1-f178.google.com with SMTP id x6-v6so6759769pln.0 for <33215@debbugs.gnu.org>; Tue, 30 Oct 2018 23:10:36 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:user-agent:mime-version; bh=x7KGw9yVOjBuSNLAfE/N/WvE+GmQVhx5Ghi7ZRKyuVI=; b=fxah2pbMGCkz3obJI/sutjxVdoEEa0KnhDGDQVN5SJJLvwww4qL81+fER/+qgi7OaE 827MmT23gcSmlvlki3QhWSOZFcp2L6abNS2q9GaF3mLrZ+9GPTkQ60VfhmdW2LAvX/eP XWEOwtwZdhB9YvcHzHmrHkjS3JV7+1co5hVN+cDmDuqJTJENj7jI0Y2vgFfpxRbRfArd p9zctVNO923i9w77Iy+Vak4sewZ470hBAzW4yA70RUygMOLFlb0ffn4Iydw8fOEyKhrW og3V+c8QTNpYDCbm8mXlC13tLYsxKuH6y7jbFUZ7EkL1H1OAmzYIJmxzAyR8MhZzHyz7 /esQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:user-agent :mime-version; bh=x7KGw9yVOjBuSNLAfE/N/WvE+GmQVhx5Ghi7ZRKyuVI=; b=j+kt42G89M0mZQODsu+gu1blyVh8+2Sazrbrs6gR0bnoz0Q+5YwvKwvXEvhAueIMT7 ccrIXmFKf47ILJdS6MPGZ4v8272s6ybLhmrVt8/9t1RQE2UJUEvOgtaslDd54akv+Wlb PdQD3iiWLINBY/uW04S5RpW01iyuV0w+Te8OQ4cLMLGDMkaEMOMUR0pUbDscyxanPzum SE6uJDsx7mDI3su6XhzYZNVyxYov2NzmE/2u1JEKNjawkkpcq2eI2TJuVN9okdtOAhZF LAGzHuKVmYxrZd16bJKw/EySj2X1uTbGyNTEHa6//SKje9kK/hhCk3UiKQBSOzSE0ITJ MBsA== X-Gm-Message-State: AGRZ1gLPx3A2m32ns1n4CT5CWmlW8+AdXQpJ5GlluuII7HwaOcudApTG cIinygwylIgbYqK8OydJy/NawMHE X-Google-Smtp-Source: AJdET5cQWpYBu5dfWFK2i3j1AZB43cbpi/6D05hEqYuS5tZYdDEODiMMZvjUS89kFBZAryb3a3WYXA== X-Received: by 2002:a17:902:263:: with SMTP id 90-v6mr1951392plc.190.1540966230835; Tue, 30 Oct 2018 23:10:30 -0700 (PDT) Received: from debian (42-3-197-089.static.netvigator.com. [42.3.197.89]) by smtp.gmail.com with ESMTPSA id t11-v6sm29801499pgn.38.2018.10.30.23.10.29 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Tue, 30 Oct 2018 23:10:30 -0700 (PDT) From: Alex Vong To: 33215@debbugs.gnu.org Subject: [PATCH 06/11] build-system: Add 'clojure-build-system'. Date: Wed, 31 Oct 2018 14:10:26 +0800 Message-ID: <87wopyfxyl.fsf@gmail.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.1 (gnu/linux) MIME-Version: 1.0 Content-Type: multipart/signed; boundary="==-=-="; micalg=pgp-sha256; protocol="application/pgp-signature" X-Spam-Score: 0.2 (/) X-Debbugs-Envelope-To: 33215 Cc: alexvong1995@gmail.com X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.8 (/) --==-=-= Content-Type: multipart/mixed; boundary="=-=-=" --=-=-= Content-Type: text/x-diff; charset=utf-8 Content-Disposition: inline; filename=0006-build-system-Add-clojure-build-system.patch Content-Transfer-Encoding: quoted-printable From=20c7a763cfa2543119cc707b434efc8680f73f6367 Mon Sep 17 00:00:00 2001 From: Alex Vong Date: Thu, 25 Oct 2018 05:44:01 +0800 Subject: [PATCH 06/11] build-system: Add 'clojure-build-system'. * guix/build-system/clojure.scm, guix/build/clojure-build-system.scm: New files. * guix/build/clojure-utils.scm (@*, @@*): New macros. (%source-dirs, %test-dirs, %compile-dir, %main-class, %omit-source?, %aot-include, %aot-exclude, %tests?, %test-include, %test-exclude, %clojure-regex): New variables. (package-name->jar-names, canonicalize-relative-path, find-files*, file-sans-extension, relative-path->clojure-lib-string, find-clojure-libs, compiled-from?, include-list\exclude-list, eval-with-clojure, create-jar): New procedures. * Makefile.am (MODULES): Add them. * doc/guix.texi (Build Systems): Document 'clojure-build-system'. =2D-- Makefile.am | 2 + doc/guix.texi | 58 ++++++++ guix/build-system/clojure.scm | 195 ++++++++++++++++++++++++++ guix/build/clojure-build-system.scm | 110 +++++++++++++++ guix/build/clojure-utils.scm | 204 +++++++++++++++++++++++++++- 5 files changed, 567 insertions(+), 2 deletions(-) create mode 100644 guix/build-system/clojure.scm create mode 100644 guix/build/clojure-build-system.scm diff --git a/Makefile.am b/Makefile.am index e2bc4d369..fce2956b4 100644 =2D-- a/Makefile.am +++ b/Makefile.am @@ -101,6 +101,7 @@ MODULES =3D \ guix/build-system/android-ndk.scm \ guix/build-system/ant.scm \ guix/build-system/cargo.scm \ + guix/build-system/clojure.scm \ guix/build-system/cmake.scm \ guix/build-system/dub.scm \ guix/build-system/emacs.scm \ @@ -138,6 +139,7 @@ MODULES =3D \ guix/build/download.scm \ guix/build/download-nar.scm \ guix/build/cargo-build-system.scm \ + guix/build/clojure-build-system.scm \ guix/build/cmake-build-system.scm \ guix/build/dub-build-system.scm \ guix/build/emacs-build-system.scm \ diff --git a/doc/guix.texi b/doc/guix.texi index b41af61f1..8b353e166 100644 =2D-- a/doc/guix.texi +++ b/doc/guix.texi @@ -51,6 +51,7 @@ Copyright @copyright{} 2018 Mike Gerwitz@* Copyright @copyright{} 2018 Pierre-Antoine Rouby@* Copyright @copyright{} 2018 G=C3=A1bor Boskovits@* Copyright @copyright{} 2018 Florian Pelz@* +Copyright @copyright{} 2018 Alex Vong@* =20 Permission is granted to copy, distribute and/or modify this document under the terms of the GNU Free Documentation License, Version 1.3 or @@ -4384,6 +4385,63 @@ The @code{install} phase installs the binaries, and = it also installs the source code and @file{Cargo.toml} file. @end defvr =20 +@cindex Clojure (programming language) +@cindex simple Clojure build system +@defvr {Scheme Variable} clojure-build-system +This variable is exported by @code{(guix build-system clojure)}. It imple= ments +a simple build procedure for @uref{https://clojure.org/, Clojure} packages +using plain old @code{compile} in Clojure. Cross-compilation is not suppo= rted +yet. + +It adds @code{clojure}, @code{icedtea} and @code{zip} to the set of inputs. +Different packages can be specified with the @code{#:clojure}, @code{#:jdk= } and +@code{#:zip} parameters, respectively. + +A list of source directories, test directories and jar names can be specif= ied +with the @code{#:source-dirs}, @code{#:test-dirs} and @code{#:jar-names} +parameters, respectively. Compile directory and main class can be specifi= ed +with the @code{#:compile-dir} and @code{#:main-class} parameters, respecti= vely. +Other parameters are documented below. + +This build system is an extension of @var{ant-build-system}, but with the +following phases changed: + +@table @code + +@item build +This phase calls @code{compile} in Clojure to compile source files and runs +@command{jar} to create jars from both source files and compiled files +according to the include list and exclude list specified in +@code{#:aot-include} and @code{#:aot-exclude}, respectively. The exclude = list +has priority over the include list. These lists consist of symbols +representing Clojure libraries or the special keyword @code{#:all} represe= nting +all Clojure libraries found under the source directories. The parameter +@code{#:omit-source?} decides if source should be included into the jars. + +@item check +This phase runs tests according to the include list and exclude list speci= fied +in @code{#:test-include} and @code{#:test-exclude}, respectively. Their +meanings are analogous to that of @code{#:aot-include} and +@code{#:aot-exclude}, except that the special keyword @code{#:all} now +stands for all Clojure libraries found under the test directories. The +parameter @code{#:tests?} decides if tests should be run. + +@item install +This phase installs all jars built previously. +@end table + +Apart from the above, this build system also contains an additional phase: + +@table @code + +@item install-doc +This phase installs all top-level files with base name matching +@var{%doc-regex}. A different regex can be specified with the +@code{#:doc-regex} parameter. All files (recursively) inside the document= ation +directories specified in @code{#:doc-dirs} are installed as well. +@end table +@end defvr + @defvr {Scheme Variable} cmake-build-system This variable is exported by @code{(guix build-system cmake)}. It implements the build procedure for packages using the diff --git a/guix/build-system/clojure.scm b/guix/build-system/clojure.scm new file mode 100644 index 000000000..5a91bcba0 =2D-- /dev/null +++ b/guix/build-system/clojure.scm @@ -0,0 +1,195 @@ +;;; GNU Guix --- Functional package management for GNU +;;; Copyright =C2=A9 2018 Alex Vong +;;; +;;; This file is part of GNU Guix. +;;; +;;; GNU Guix is free software; you can redistribute it and/or modify it +;;; under the terms of the GNU General Public License as published by +;;; the Free Software Foundation; either version 3 of the License, or (at +;;; your option) any later version. +;;; +;;; GNU Guix is distributed in the hope that it will be useful, but +;;; WITHOUT ANY WARRANTY; without even the implied warranty of +;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +;;; GNU General Public License for more details. +;;; +;;; You should have received a copy of the GNU General Public License +;;; along with GNU Guix. If not, see . + +(define-module (guix build-system clojure) + #:use-module (guix build clojure-utils) + #:use-module (guix build-system) + #:use-module (guix build-system ant) + #:use-module ((guix build-system gnu) + #:select (standard-packages) + #:prefix gnu:) + + #:use-module (guix derivations) + #:use-module (guix packages) + #:use-module ((guix search-paths) + #:select + ((search-path-specification->sexp . search-path-spec->sexp= ))) + #:use-module (guix utils) + + #:use-module (ice-9 match) + #:export (%clojure-build-system-modules + clojure-build + clojure-build-system)) + +;; Commentary: +;; +;; Standard build procedure for Clojure packages. +;; +;; Code: + +(define-with-docs %clojure-build-system-modules + "Build-side modules imported and used by default." + `((guix build clojure-build-system) + (guix build clojure-utils) + (guix build guile-build-system) + ,@%ant-build-system-modules)) + +(define-with-docs %default-clojure + "The default Clojure package." + (delay (@* (gnu packages lisp) clojure))) + +(define-with-docs %default-jdk + "The default JDK package." + (delay (@* (gnu packages java) icedtea))) + +(define-with-docs %default-zip + "The default ZIP package." + (delay (@* (gnu packages compression) zip))) + +(define* (lower name + #:key + source target + inputs native-inputs + (clojure (force %default-clojure)) + (jdk (force %default-jdk)) + (zip (force %default-zip)) + outputs system + #:allow-other-keys + #:rest arguments) + "Return a bag for NAME." + (let ((private-keywords '(#:source #:target + #:inputs #:native-inputs + #:clojure #:jdk #:zip))) + + (if target + (error "No cross-compilation for clojure-build-system yet: LOWER" + target) ; FIXME + (bag (name name) + (system system) + (host-inputs `(,@(if source + `(("source" ,source)) + '()) + ,@inputs + ,@(gnu:standard-packages))) + (build-inputs `(("clojure" ,clojure) + ("jdk" ,jdk "jdk") + ("zip" ,zip) + ,@native-inputs)) + (outputs outputs) + (build clojure-build) + (arguments (strip-keyword-arguments private-keywords + arguments)))))) + +(define-with-docs source->output-path + "Convert source input to output path." + (match-lambda + (((? derivation? source)) + (derivation->output-path source)) + ((source) + source) + (source + source))) + +(define-with-docs maybe-guile->guile + "Find the right guile." + (match-lambda + ((and maybe-guile (? package?)) + maybe-guile) + (#f ; default + (@* (gnu packages commencement) guile-final)))) + +(define* (clojure-build store name inputs + #:key + (source-dirs `',%source-dirs) + (test-dirs `',%test-dirs) + (compile-dir %compile-dir) + + (jar-names `',(package-name->jar-names name)) + (main-class %main-class) + (omit-source? %omit-source?) + + (aot-include `',%aot-include) + (aot-exclude `',%aot-exclude) + + doc-dirs ; no sensible default + (doc-regex %doc-regex) + + (tests? %tests?) + (test-include `',%test-include) + (test-exclude `',%test-exclude) + + (phases '(@ (guix build clojure-build-system) + %standard-phases)) + (outputs '("out")) + (search-paths '()) + (system (%current-system)) + (guile #f) + + (imported-modules %clojure-build-system-modules) + (modules %clojure-build-system-modules)) + "Build SOURCE with INPUTS." + (let ((builder `(begin + (use-modules ,@modules) + (clojure-build #:name ,name + #:source ,(source->output-path + (assoc-ref inputs "source")) + + #:source-dirs ,source-dirs + #:test-dirs ,test-dirs + #:compile-dir ,compile-dir + + #:jar-names ,jar-names + #:main-class ,main-class + #:omit-source? ,omit-source? + + #:aot-include ,aot-include + #:aot-exclude ,aot-exclude + + #:doc-dirs ,doc-dirs + #:doc-regex ,doc-regex + + #:tests? ,tests? + #:test-include ,test-include + #:test-exclude ,test-exclude + + #:phases ,phases + #:outputs %outputs + #:search-paths ',(map search-path-spec-= >sexp + search-paths) + #:system ,system + #:inputs %build-inputs))) + + (guile-for-build (package-derivation store + (maybe-guile->guile guile) + system + #:graft? #f))) + + (build-expression->derivation store name builder + #:inputs inputs + #:system system + #:modules imported-modules + #:outputs outputs + #:guile-for-build guile-for-build))) + +(define clojure-build-system + (build-system + (name 'clojure) + (description "Simple Clojure build system using plain old 'compile'") + (lower lower))) + +;;; clojure.scm ends here diff --git a/guix/build/clojure-build-system.scm b/guix/build/clojure-build= -system.scm new file mode 100644 index 000000000..d8f7c89f8 =2D-- /dev/null +++ b/guix/build/clojure-build-system.scm @@ -0,0 +1,110 @@ +;;; GNU Guix --- Functional package management for GNU +;;; Copyright =C2=A9 2018 Alex Vong +;;; +;;; This file is part of GNU Guix. +;;; +;;; GNU Guix is free software; you can redistribute it and/or modify it +;;; under the terms of the GNU General Public License as published by +;;; the Free Software Foundation; either version 3 of the License, or (at +;;; your option) any later version. +;;; +;;; GNU Guix is distributed in the hope that it will be useful, but +;;; WITHOUT ANY WARRANTY; without even the implied warranty of +;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +;;; GNU General Public License for more details. +;;; +;;; You should have received a copy of the GNU General Public License +;;; along with GNU Guix. If not, see . + +(define-module (guix build clojure-build-system) + #:use-module ((guix build ant-build-system) + #:select ((%standard-phases . %standard-phases@ant) + ant-build)) + #:use-module (guix build clojure-utils) + #:use-module (guix build java-utils) + #:use-module (guix build utils) + #:use-module (srfi srfi-1) + #:use-module (srfi srfi-26) + #:export (%standard-phases + clojure-build)) + +;; Commentary: +;; +;; Builder-side code of the standard build procedure for Clojure packages. +;; +;; Code: + +(define* (build #:key + source-dirs compile-dir + jar-names main-class omit-source? + aot-include aot-exclude + #:allow-other-keys) + "Standard 'build' phase for clojure-build-system." + (let* ((libs (append-map find-clojure-libs source-dirs)) + (libs* (include-list\exclude-list aot-include + aot-exclude + #:all-list libs))) + (mkdir-p compile-dir) + (eval-with-clojure `(run! compile ',libs*) + source-dirs) + (let ((source-dir-files-alist (map (lambda (dir) + (cons dir (find-files* dir))) + source-dirs)) + ;; workaround transitive compilation in Clojure + (classes (filter (lambda (class) + (any (cut compiled-from? class <>) + libs*)) + (find-files* compile-dir)))) + (for-each (cut create-jar <> (cons (cons compile-dir classes) + (if omit-source? + '() + source-dir-files-alist)) + #:main-class main-class) + jar-names) + #t))) + +(define* (check #:key + test-dirs + jar-names + tests? test-include test-exclude + #:allow-other-keys) + "Standard 'check' phase for clojure-build-system. Note that TEST-EXCLUD= E has +priority over TEST-INCLUDE." + (if tests? + (let* ((libs (append-map find-clojure-libs test-dirs)) + (libs* (include-list\exclude-list test-include + test-exclude + #:all-list libs))) + (for-each (lambda (jar) + (eval-with-clojure `(do (apply require + '(clojure.test ,@libs*)) + (apply clojure.test/run-tests + ',libs*)) + (cons jar test-dirs))) + jar-names))) + #t) + +(define-with-docs install + "Standard 'install' phase for clojure-build-system." + (install-jars "./")) + +(define-with-docs %standard-phases + "Standard build phases for clojure-build-system." + (modify-phases %standard-phases@ant + (replace 'build build) + (replace 'check check) + (replace 'install install) + (add-after 'install-license-files 'install-doc install-doc))) + +(define* (clojure-build #:key + inputs + (phases %standard-phases) + #:allow-other-keys + #:rest args) + "Build the given Clojure package, applying all of PHASES in order." + (apply ant-build + #:inputs inputs + #:phases phases + args)) + +;;; clojure-build-system.scm ends here diff --git a/guix/build/clojure-utils.scm b/guix/build/clojure-utils.scm index 713dff2d8..027777b4d 100644 =2D-- a/guix/build/clojure-utils.scm +++ b/guix/build/clojure-utils.scm @@ -19,12 +19,48 @@ (define-module (guix build clojure-utils) #:use-module (guix build utils) #:use-module (ice-9 ftw) + #:use-module (ice-9 match) #:use-module (ice-9 regex) #:use-module (srfi srfi-1) + #:use-module (srfi srfi-8) #:use-module (srfi srfi-26) =2D #:export (%clojure-regex + #:export (@* + @@* define-with-docs =2D install-doc)) + + %doc-regex + install-doc + + %source-dirs + %test-dirs + %compile-dir + package-name->jar-names + %main-class + %omit-source? + %aot-include + %aot-exclude + %tests? + %test-include + %test-exclude + + %clojure-regex + canonicalize-relative-path + find-files* + file-sans-extension + relative-path->clojure-lib-string + find-clojure-libs + compiled-from? + include-list\exclude-list + eval-with-clojure + create-jar)) + +(define-syntax-rule (@* module name) + "Like (@ MODULE NAME), but resolves at run time." + (module-ref (resolve-interface 'module) 'name)) + +(define-syntax-rule (@@* module name) + "Like (@@ MODULE NAME), but resolves at run time." + (module-ref (resolve-module 'module) 'name)) =20 (define-syntax-rule (define-with-docs name docs val) "Create top-level variable named NAME with doc string DOCS and value VAL= ." @@ -63,3 +99,167 @@ DOC-REGEX can be compiled or uncompiled." (for-each (cut copy-recursively <> dest-dir) doc-dirs) #t)) + +(define-with-docs %source-dirs + "A default list of source directories." + '("src/")) + +(define-with-docs %test-dirs + "A default list of test directories." + '("test/")) + +(define-with-docs %compile-dir + "Default directory for holding class files." + "classes/") + +(define (package-name->jar-names name) + "Given NAME, a package name like \"foo-0.9.1b\", +return the list of default jar names: (\"foo-0.9.1b.jar\" \"foo.jar\")." + (map (cut string-append <> ".jar") + (list name + (receive (base-name _) + (package-name->name+version name) + base-name)))) + +(define-with-docs %main-class + "Default name for main class. It should be a symbol or #f." + #f) + +(define-with-docs %omit-source? + "Include source in jars by default." + #f) + +(define-with-docs %aot-include + "A default list of symbols deciding what to compile. Note that the excl= ude +list has priority over the include list. The special keyword #:all repres= ents +all libraries found under the source directories." + '(#:all)) + +(define-with-docs %aot-exclude + "A default list of symbols deciding what not to compile. +See the doc string of '%aot-include' for more details." + '()) + +(define-with-docs %tests? + "Enable tests by default." + #t) + +(define-with-docs %test-include + "A default list of symbols deciding what tests to include. Note that the +exclude list has priority over the include list. The special keyword #:all +represents all tests found under the test directories." + '(#:all)) + +(define-with-docs %test-exclude + "A default list of symbols deciding what tests to exclude. +See the doc string of '%test-include' for more details." + '()) + +(define-with-docs %clojure-regex + "Default regex for matching the base name of clojure source files." + "\\.cljc?$") + +(define-with-docs canonicalize-relative-path + "Like 'canonicalize-path', but for relative paths. +Canonicalizations requiring the path to exist are omitted." + (let ((remove.. (lambda (ls) + (fold-right (match-lambda* + (((and comp (not "..")) (".." comps ...)) + comps) + ((comp (comps ...)) + (cons comp comps))) + '() + ls)))) + (compose (match-lambda + (() ".") + (ls (string-join ls "/"))) + remove.. + (cut remove (cut member <> '("" ".")) <>) + (cut string-split <> #\/)))) + +(define (find-files* base-dir . args) + "Similar to 'find-files', but with BASE-DIR stripped and result +canonicalized." + (map canonicalize-relative-path + (with-directory-excursion base-dir + (apply find-files "./" args)))) + +;;; FIXME: should be moved to (guix build utils) +(define-with-docs file-sans-extension + "Strip extension from path, if any." + (@@ (guix build guile-build-system) + file-sans-extension)) + +(define (relative-path->clojure-lib-string path) + "Convert PATH to a clojure library string." + (string-map (match-lambda + (#\/ #\.) + (#\_ #\-) + (chr chr)) + (file-sans-extension path))) + +(define* (find-clojure-libs base-dir + #:key (clojure-regex %clojure-regex)) + "Return the list of clojure libraries found under BASE-DIR. + +CLOJURE-REGEX can be compiled or uncompiled." + (map (compose string->symbol + relative-path->clojure-lib-string) + (find-files* base-dir clojure-regex))) + +(define (compiled-from? class lib) + "Given class file CLASS and clojure library symbol LIB, decide if CLASS +results from compiling LIB." + (string-prefix? (symbol->string lib) + (relative-path->clojure-lib-string class))) + +(define* (include-list\exclude-list include-list exclude-list + #:key all-list) + "Given INCLUDE-LIST and EXCLUDE-LIST, replace all occurences of #:all by +slicing ALL-LIST into them and compute their list difference." + (define (replace-#:all ls all-ls) + (append-map (match-lambda + (#:all all-ls) + (x (list x))) + ls)) + (let ((include-list* (replace-#:all include-list all-list)) + (exclude-list* (replace-#:all exclude-list all-list))) + (lset-difference equal? include-list* exclude-list*))) + +(define (eval-with-clojure expr extra-paths) + "Evaluate EXPR with clojure. + +EXPR must be a s-expression writable by guile and readable by clojure. +For examples, '(require '[clojure.string]) will not work, +because the guile writer converts brackets to parentheses. + +EXTRA-PATHS is a list of paths which will be appended to $CLASSPATH." + (let* ((classpath (getenv "CLASSPATH")) + (classpath* (string-join (cons classpath extra-paths) ":"))) + (invoke "java" + "-classpath" classpath* + "clojure.main" + "--eval" (object->string expr)))) + +(define* (create-jar output-jar dir-files-alist + #:key + (verbose? #t) + (compress? #f) + (main-class %main-class)) + "Given DIR-FILES-ALIST, an alist of the form: ((DIR . FILES) ...) +Create jar named OUTPUT-JAR from FILES with DIR stripped." + (let ((grouped-options (string-append "c" + (if verbose? "v" "") + "f" + (if compress? "" "0") + (if main-class "e" "")))) + (apply invoke `("jar" + ,grouped-options + ,output-jar + ,@(if main-class (list (symbol->string main-class)) '(= )) + ,@(append-map (match-lambda + ((dir . files) + (append-map (lambda (file) + `("-C" ,dir ,file)) + files))) + dir-files-alist))))) =2D-=20 2.19.1 --=-=-=-- --==-=-= Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iHUEARYIAB0WIQSof2ZdXkE0FM5aU4XzrkvbI+zaGwUCW9lHUgAKCRDzrkvbI+za G030AP9YFN+EaTeNWU+xaXgwez93werJ8wRe9R2QRFuyWhiWSgEAzrgOE1H3nAmA DIsQbeHESPKheXPT6dI9T2GRr+Xf2g4= =MflD -----END PGP SIGNATURE----- --==-=-=-- From debbugs-submit-bounces@debbugs.gnu.org Wed Oct 31 02:11:15 2018 Received: (at 33215) by debbugs.gnu.org; 31 Oct 2018 06:11:15 +0000 Received: from localhost ([127.0.0.1]:56188 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1gHjil-0006jZ-0a for submit@debbugs.gnu.org; Wed, 31 Oct 2018 02:11:15 -0400 Received: from mail-pl1-f194.google.com ([209.85.214.194]:34917) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1gHjij-0006jM-Au for 33215@debbugs.gnu.org; Wed, 31 Oct 2018 02:11:13 -0400 Received: by mail-pl1-f194.google.com with SMTP id n4-v6so6175116plp.2 for <33215@debbugs.gnu.org>; Tue, 30 Oct 2018 23:11:13 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:user-agent:mime-version; bh=+3YsHOZdmgrBt3ax7SZ48LRGWq4NysKeg5mkpP3ikBs=; b=ilo9tQbnQTIj9oWczt6b9ZA79+YP/8p1BUEuOjVQw8e2C9oY8cdVgJEBeV8VuFtkqk 9x8KT/rqa8AUVBbACrZzNYNJV+O2nHJIO8z499LfPVUOHE86IdP6t9vgfWLwRi5IaLn8 ner9q6U/szMDeTvlcR4NK2sGqE3gDM9rhHtgOt262x1b93eA8mWWy6i6h3DtCue+BsTp r371UIhCzbDT8A8DyBOqi+HhSS/siI9z4+rNHpR/pKqrd+reAwgqTyWsvC8QnNnm4cUW iIZd3xGtMss7sbOXjYj2ShWKv6uv9JFsSisG46CcEBrbZ6BQ8w29GhTGpvTXxP5Hzdh5 GfcQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:user-agent :mime-version; bh=+3YsHOZdmgrBt3ax7SZ48LRGWq4NysKeg5mkpP3ikBs=; b=O0WnTsmVNrrO8/fMyc/+9TJGH191++gCav+p/nr3ugh8kceD4XwhQ1pdzxSR/5kthW 9Y/T5qM+pNYtg8DTqNS2C1p1eVHp0oEmycZm0iQOJEpPb9KRzRSKW6MnguCq8ws+AEYT wKyX7gce/3O+cjHpCjaL+6OBvvxws6QCks+g7/BX+auffrRiCJBd8gLTf0J2/YSh4/ai DTprAWwfHuKhCyeThDNPBgnlcU+OsOwOSNCR+kFeePbyhjuna56D80ChME0qVMjy7t2E n5vBCqoaiBQNlGjtdlHgNOKzzFtPEIV4z4imc2lRfY89qHh8rmjwd3w5rNPFZgfvmchx 66wg== X-Gm-Message-State: AGRZ1gJcFs55o81ojzXanYN47JXFN0Rt1cZRoIR5FqR0aAAiEZWhox3u PnfDNhH56rwv6Vekyx7/J89atgCP X-Google-Smtp-Source: AJdET5dYd7EBSZVcUkTxcmsTY5wdSXGzapWdafZTz+HX1kMUrr8f4Yo43zwiuWjKFsy/U7KxITMNlA== X-Received: by 2002:a17:902:e20e:: with SMTP id ce14-v6mr1900765plb.226.1540966267838; Tue, 30 Oct 2018 23:11:07 -0700 (PDT) Received: from debian (42-3-197-089.static.netvigator.com. [42.3.197.89]) by smtp.gmail.com with ESMTPSA id 130-v6sm28830029pfz.174.2018.10.30.23.11.06 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Tue, 30 Oct 2018 23:11:07 -0700 (PDT) From: Alex Vong To: 33215@debbugs.gnu.org Subject: [PATCH 07/11] gnu: Add clojure-instaparse. Date: Wed, 31 Oct 2018 14:11:03 +0800 Message-ID: <87sh0mfxxk.fsf@gmail.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.1 (gnu/linux) MIME-Version: 1.0 Content-Type: multipart/signed; boundary="==-=-="; micalg=pgp-sha256; protocol="application/pgp-signature" X-Spam-Score: 0.3 (/) X-Debbugs-Envelope-To: 33215 Cc: alexvong1995@gmail.com X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.7 (/) --==-=-= Content-Type: multipart/mixed; boundary="=-=-=" --=-=-= Content-Type: text/x-diff Content-Disposition: inline; filename=0007-gnu-Add-clojure-instaparse.patch Content-Transfer-Encoding: quoted-printable From=20835b431224da203bfefc984019529679495a64b5 Mon Sep 17 00:00:00 2001 From: Alex Vong Date: Sun, 14 Oct 2018 04:17:14 +0800 Subject: [PATCH 07/11] gnu: Add clojure-instaparse. * gnu/packages/lisp.scm (clojure-instaparse): New public variable. =2D-- gnu/packages/lisp.scm | 53 +++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 53 insertions(+) diff --git a/gnu/packages/lisp.scm b/gnu/packages/lisp.scm index ee43e5abf..3bb70c692 100644 =2D-- a/gnu/packages/lisp.scm +++ b/gnu/packages/lisp.scm @@ -36,6 +36,7 @@ #:use-module (guix utils) #:use-module (guix build-system gnu) #:use-module (guix build-system ant) + #:use-module (guix build-system clojure) #:use-module (guix build-system asdf) #:use-module (guix build-system trivial) #:use-module (gnu packages admin) @@ -1603,6 +1604,58 @@ compressor. It works on data produced by @code{pars= e-js} to generate a ("sbcl-cl-uglify-js" ,sbcl-cl-uglify-js))) (synopsis "JavaScript compressor"))) =20 +(define-public clojure-instaparse + (let ((commit "dcfffad5b065e750f0f5835f017cdd8188b8ca2e") + (version "1.4.9")) ; upstream forget to tag this release + (package + (name "clojure-instaparse") + (version version) + (source (origin + (method git-fetch) + (uri (git-reference + (url "https://github.com/Engelberg/instaparse.git") + (commit commit))) + (file-name (git-file-name name version)) + (sha256 + (base32 + "002mrgin4z3dqy88r1lak7smd0m7x8d22vmliw0m6w6mh5pa17lk"))= )) + (build-system clojure-build-system) + (arguments + '(#:doc-dirs '("docs/"))) + (synopsis "No grammar left behind") + (description + "Instaparse aims to be the simplest way to build parsers in Clojure. + +@itemize +@item Turns @emph{standard EBNF or ABNF notation} for context-free grammars +into an executable parser that takes a string as an input and produces a p= arse +tree for that string. + +@item @dfn{No Grammar Left Behind}: Works for @emph{any} context-free gram= mar, +including @emph{left-recursive}, @emph{right-recursive}, and @emph{ambiguo= us} +grammars. + +@item Extends the power of context-free grammars with PEG-like syntax for +lookahead and negative lookahead. + +@item Supports both of Clojure's most popular tree formats (hiccup and enl= ive) +as output targets + +@item Detailed reporting of parse errors. + +@item Optionally produces lazy sequence of all parses (especially useful f= or +diagnosing and debugging ambiguous grammars). + +@item ``Total parsing'' mode where leftover string is embedded in the parse +tree. + +@item Optional combinator library for building grammars programmatically. + +@item Performant. +@end itemize") + (home-page "https://github.com/Engelberg/instaparse") + (license license:epl1.0)))) + (define-public confusion-mdl (let* ((commit "12a055581fc262225272df43287dae48281900f5")) (package =2D-=20 2.19.1 --=-=-=-- --==-=-= Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iHUEARYIAB0WIQSof2ZdXkE0FM5aU4XzrkvbI+zaGwUCW9lHdwAKCRDzrkvbI+za GzpdAQCU4qv/7Pmd0H1VeXr6N0fHBIbpZ3MRyTbvh3nCIKd8zAEAqekAg03xTvbl mbjWEB02PhG3iaElxeRos2xgj5ymRAU= =vYQr -----END PGP SIGNATURE----- --==-=-=-- From debbugs-submit-bounces@debbugs.gnu.org Wed Oct 31 02:11:51 2018 Received: (at 33215) by debbugs.gnu.org; 31 Oct 2018 06:11:51 +0000 Received: from localhost ([127.0.0.1]:56191 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1gHjjL-0006kN-CX for submit@debbugs.gnu.org; Wed, 31 Oct 2018 02:11:51 -0400 Received: from mail-pf1-f194.google.com ([209.85.210.194]:43025) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1gHjjK-0006kA-4U for 33215@debbugs.gnu.org; Wed, 31 Oct 2018 02:11:50 -0400 Received: by mail-pf1-f194.google.com with SMTP id h4-v6so7067070pfi.10 for <33215@debbugs.gnu.org>; Tue, 30 Oct 2018 23:11:50 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:user-agent:mime-version; bh=KBKGPyxrxwgFpe/Ki/LrhF22CWqrhbc/nUl69lElTL4=; b=Nld71CsYvaCLTsB16awhI1bbB0oElDWe0R2D30ImfFog+yXKWtaNkY1cNgMP5CF8WW 2lPOCxNciCTvLM3DfJ6ntv26MkBxTFYWzSlm44LJI6QNGbSqf9bwJRXmI+yil2I8OwzF GwZHk6k/UvCE9q6jQIWV7QezwlHbU+skq0uMNFNrDgNRcnwRizOlQolcaH6Y+VxMzZuX LQQUAHCmdzADBKmdzkyuriAR7UU7o1v+Ml/oZH+PbAMGt/mi1/rKj3CfcDIMdeBgDwDe r8PgUTrZTsKrchAiLwcsbsXbQxNN6qu3Pi/FVvUxJTCGQWJKcsUv2izFomS+Db0mjWiM VD+g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:user-agent :mime-version; bh=KBKGPyxrxwgFpe/Ki/LrhF22CWqrhbc/nUl69lElTL4=; b=Tb1Oc0Xreq2fOrACUamPh4F0G6nNPxEzqoi3JCh/Fh2AihS4spHLyT0cWj/cwZ76Iw qhxKyK2NoENyna890ABv9Na+Y79JqlDXuY0YeKKUZd0iB49VYHoobIqJnWQ42OSN2SS3 h8P1CaPUqo1zuNODtv19/6wYnS5SG9miJbLaD4t8d9OhAbxIuzbOvT1gUs0Ti7vLhjr7 4ABz5Ex7HPuyuWZtjKcibBfy5C2wXkYsosh84nKJScin9rUgDnL4rY8r83zcFMdqNV0C 0mRDFFgmu59rnc9W/xTnEPG3RMEXy01wP1+NBFgO8AakMVwXn3r6kKkcNcvjUx6yhC7j Qz7w== X-Gm-Message-State: AGRZ1gLBSz8M/RuahunQZeWki6R1pDcIOO3y/jGwIo6V0000++opngTd 4Hb7br/fZeqhFvcPw9m5+Kg= X-Google-Smtp-Source: AJdET5dbqQPSFws2hGr92d8QVSJcQ4lsflHdQq5uuVRiz5hTSg4AqidsuZ5Ccyv4b9PJH9QMIX7H4w== X-Received: by 2002:a62:2a04:: with SMTP id q4-v6mr1941685pfq.61.1540966304496; Tue, 30 Oct 2018 23:11:44 -0700 (PDT) Received: from debian (42-3-197-089.static.netvigator.com. [42.3.197.89]) by smtp.gmail.com with ESMTPSA id k70-v6sm30099903pfc.76.2018.10.30.23.11.43 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Tue, 30 Oct 2018 23:11:43 -0700 (PDT) From: Alex Vong To: 33215@debbugs.gnu.org Subject: [PATCH 08/11] gnu: Add clojure-core-match. Date: Wed, 31 Oct 2018 14:11:38 +0800 Message-ID: <87o9bafxwl.fsf@gmail.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.1 (gnu/linux) MIME-Version: 1.0 Content-Type: multipart/signed; boundary="==-=-="; micalg=pgp-sha256; protocol="application/pgp-signature" X-Spam-Score: 0.3 (/) X-Debbugs-Envelope-To: 33215 Cc: alexvong1995@gmail.com X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.7 (/) --==-=-= Content-Type: multipart/mixed; boundary="=-=-=" --=-=-= Content-Type: text/x-diff Content-Disposition: inline; filename=0008-gnu-Add-clojure-core-match.patch Content-Transfer-Encoding: quoted-printable From=20d68fa82e88fcb2e382f5b93519dbde4b48d7abe4 Mon Sep 17 00:00:00 2001 From: Alex Vong Date: Sun, 14 Oct 2018 18:08:26 +0800 Subject: [PATCH 08/11] gnu: Add clojure-core-match. * gnu/packages/lisp.scm (clojure-core-match): New public variable. =2D-- gnu/packages/lisp.scm | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) diff --git a/gnu/packages/lisp.scm b/gnu/packages/lisp.scm index 3bb70c692..db8d0e61a 100644 =2D-- a/gnu/packages/lisp.scm +++ b/gnu/packages/lisp.scm @@ -1604,6 +1604,33 @@ compressor. It works on data produced by @code{pars= e-js} to generate a ("sbcl-cl-uglify-js" ,sbcl-cl-uglify-js))) (synopsis "JavaScript compressor"))) =20 +(define-public clojure-core-match + (let ((commit "1837ffbd4a150e8f3953b2d9ed5cf4a4ad3720a7") + (revision "1")) ; this is the 1st commit buildable with clojure 1.9 + (package + (name "clojure-core-match") + (version (git-version "0.3.0-alpha5" revision commit)) + (source (origin + (method git-fetch) + (uri (git-reference + (url "https://github.com/clojure/core.match.git") + (commit commit))) + (file-name (git-file-name name version)) + (sha256 + (base32 + "04bdlp5dgkrqzrz0lw3mfwmygj2218qnm1cz3dkb9wy4m0238s4d"))= )) + (build-system clojure-build-system) + (arguments + '(#:source-dirs '("src/main/clojure") + #:test-dirs '("src/test/clojure") + #:doc-dirs '())) + (synopsis "Optimized pattern matching for Clojure") + (description + "An optimized pattern matching library for Clojure. +It supports Clojure 1.5.1 and later as well as ClojureScript.") + (home-page "https://github.com/clojure/core.match") + (license license:epl1.0)))) + (define-public clojure-instaparse (let ((commit "dcfffad5b065e750f0f5835f017cdd8188b8ca2e") (version "1.4.9")) ; upstream forget to tag this release =2D-=20 2.19.1 --=-=-=-- --==-=-= Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iHUEARYIAB0WIQSof2ZdXkE0FM5aU4XzrkvbI+zaGwUCW9lHmgAKCRDzrkvbI+za G9woAP94pII1X88QpI0EZfE89OLQ/wISkNKA9HD6qSvH6GFemwD/WdYl0d6ob/OH t4noXbwYRBJQn8vYfmpa6D/hh0wnCgU= =Bnof -----END PGP SIGNATURE----- --==-=-=-- From debbugs-submit-bounces@debbugs.gnu.org Wed Oct 31 02:12:51 2018 Received: (at 33215) by debbugs.gnu.org; 31 Oct 2018 06:12:52 +0000 Received: from localhost ([127.0.0.1]:56197 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1gHjkJ-0006mF-Nk for submit@debbugs.gnu.org; Wed, 31 Oct 2018 02:12:51 -0400 Received: from mail-pf1-f196.google.com ([209.85.210.196]:44179) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1gHjkI-0006m3-49 for 33215@debbugs.gnu.org; Wed, 31 Oct 2018 02:12:50 -0400 Received: by mail-pf1-f196.google.com with SMTP id j13-v6so3581083pff.11 for <33215@debbugs.gnu.org>; Tue, 30 Oct 2018 23:12:50 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:user-agent:mime-version; bh=C/RNdb8yzV/BN/FcxPch3go6mMRpv/8N4IMDjTJu4Wg=; b=iBEurykypNTwWYBRnIjEBh4CQlKcsUn9B198Kj/fggqiOy0RTTXNB7QzSAqlqbVpNN DjAScgrFdPU4Sv8gLdWMdbyDU3G0nsdWMkAoqlokBoGxEfibFwO1GqbPTyxAI06hqqsK o31CzMsypPHr3BeOEro7wyapLmuzYLiPm9bHP9AgqUn/pqgt6uX3pjM4IHH0tRDWMSAl g7WctVZpiBzc4iqARb0pLR506gvm9ijlaYSuHN2bsFUlaZw1ARiwBG/rp3T3SszjByVC 2m/wQsYyQNjUKeLNi4OTpyVAArXdhNPgkxvzxRY4y2h8QCFNiMNLRSMaz22SvR4gtJSh lgxA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:user-agent :mime-version; bh=C/RNdb8yzV/BN/FcxPch3go6mMRpv/8N4IMDjTJu4Wg=; b=eZ5Zs4/oSva5V5YcAg+WY4mdqVgJNovE1s3G0qQaQXQkkSyu9VFlmH3BQf/6wpO2GK SBuzqY9s3sbpvqA/zh/DqlY4AfzdgN2KL++Ewec73P1lD2OXG1/m++g7lveWmHGkcgKU kWdikpfJ/Rb1qS2VUB1REOaCFtytHMfYaD7QYq9pmaxWsyTqo0lBir5LDD9grbK++nWC 6v3RgbFK34HFM0fO/Ez+sooQsFYNteEZhxbyboFjvs6tV7UPL2FngizSS1EmHxOq9FyH HfjIMbRX8wcMn+J4EzOmdLg2jE0K3dvFJ2yGMNeOIR4+qyB4Qu2CGaSYE9z6ihH6C2J3 pMEQ== X-Gm-Message-State: AGRZ1gLImBY8yJ/6ljFAtxpXq1qs/WSIaGwmVRgGyV8aAvfypX/2gyN/ Y3IS3aRxqBwkcgB2VBq52VQ= X-Google-Smtp-Source: AJdET5fqW1ssBi9vx8iXBeXSIiD6WBiOp5jXwkIKxMXFnU+KQW09q+UkCto93Qv2FmBhao5hkqSZYg== X-Received: by 2002:a62:8a0d:: with SMTP id y13-v6mr1995339pfd.142.1540966364528; Tue, 30 Oct 2018 23:12:44 -0700 (PDT) Received: from debian (42-3-197-089.static.netvigator.com. [42.3.197.89]) by smtp.gmail.com with ESMTPSA id y88-v6sm14208788pfd.104.2018.10.30.23.12.43 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Tue, 30 Oct 2018 23:12:43 -0700 (PDT) From: Alex Vong To: 33215@debbugs.gnu.org Subject: [PATCH 09/11] gnu: Add clojure-algo-generic. Date: Wed, 31 Oct 2018 14:12:30 +0800 Message-ID: <87k1lyfxv5.fsf@gmail.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.1 (gnu/linux) MIME-Version: 1.0 Content-Type: multipart/signed; boundary="==-=-="; micalg=pgp-sha256; protocol="application/pgp-signature" X-Spam-Score: 0.3 (/) X-Debbugs-Envelope-To: 33215 Cc: alexvong1995@gmail.com X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.7 (/) --==-=-= Content-Type: multipart/mixed; boundary="=-=-=" --=-=-= Content-Type: text/x-diff Content-Disposition: inline; filename=0009-gnu-Add-clojure-algo-generic.patch Content-Transfer-Encoding: quoted-printable From=20f7228a07fa32fe3c6f4f0808e3112d63888e67cc Mon Sep 17 00:00:00 2001 From: Alex Vong Date: Sun, 14 Oct 2018 19:06:52 +0800 Subject: [PATCH 09/11] gnu: Add clojure-algo-generic. * gnu/packages/lisp.scm (clojure-algo-generic): New public variable. =2D-- gnu/packages/lisp.scm | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) diff --git a/gnu/packages/lisp.scm b/gnu/packages/lisp.scm index db8d0e61a..78a74e981 100644 =2D-- a/gnu/packages/lisp.scm +++ b/gnu/packages/lisp.scm @@ -1604,6 +1604,30 @@ compressor. It works on data produced by @code{pars= e-js} to generate a ("sbcl-cl-uglify-js" ,sbcl-cl-uglify-js))) (synopsis "JavaScript compressor"))) =20 +(define-public clojure-algo-generic + (package + (name "clojure-algo-generic") + (version "0.1.3") + (source + (origin + (method url-fetch) + (uri + (string-append "https://github.com/clojure/algo.generic/archive" + "/algo.generic-" version ".tar.gz")) + (sha256 + (base32 "12w9681i545gp1af4576z1qbixwps1j13c16fmcc7zsb0bd1zr7w")))) + (build-system clojure-build-system) + (arguments + '(#:source-dirs '("src/main/clojure/") + #:test-dirs '("src/test/clojure/") + #:doc-dirs '())) + (synopsis "Generic versions of common functions") + (description + "Generic versions of commonly used functions, implemented as multimet= hods +that can be implemented for any data type.") + (home-page "https://github.com/clojure/algo.generic") + (license license:epl1.0))) + (define-public clojure-core-match (let ((commit "1837ffbd4a150e8f3953b2d9ed5cf4a4ad3720a7") (revision "1")) ; this is the 1st commit buildable with clojure 1.9 =2D-=20 2.19.1 --=-=-=-- --==-=-= Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iHUEARYIAB0WIQSof2ZdXkE0FM5aU4XzrkvbI+zaGwUCW9lHzgAKCRDzrkvbI+za G7s+AQDVHOkY8qcqEXMQwi54C20pNaRkx2uV4WSF6WSxmQfLRwEAuAgOG0Rkb8x7 zoHpogodmv24HHTZMoFqGqKp1C6BAgY= =q7UZ -----END PGP SIGNATURE----- --==-=-=-- From debbugs-submit-bounces@debbugs.gnu.org Wed Oct 31 02:13:45 2018 Received: (at 33215) by debbugs.gnu.org; 31 Oct 2018 06:13:45 +0000 Received: from localhost ([127.0.0.1]:56201 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1gHjlA-0006nq-1d for submit@debbugs.gnu.org; Wed, 31 Oct 2018 02:13:45 -0400 Received: from mail-pg1-f181.google.com ([209.85.215.181]:34823) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1gHjl8-0006nd-Ti for 33215@debbugs.gnu.org; Wed, 31 Oct 2018 02:13:43 -0400 Received: by mail-pg1-f181.google.com with SMTP id 32-v6so6867631pgu.2 for <33215@debbugs.gnu.org>; Tue, 30 Oct 2018 23:13:42 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:user-agent:mime-version; bh=pkoJHS84eK4eH0JOIYVnps1ErLcIHBSppKLynnEUbI0=; b=UnDhG+qP/Tv3qLZAApHWtzDVGaWT0Wgu+7ftnh+BA39dy7tiwhZkNWZOysSk/G6puC TwB8J7oW8AX2W+c673m9TgxIZUX5JxHHOym+/cl4nAgIL69+v4Koct5CJbq1ntak7xiL RQOcbxr3XzQdN2KnwtL15DBVB4m538V7kD6OuvnN909M5Xh8HJlk+dlFPHLWv9oWa0h0 T2W6NfKxlrBSP3FmXeWgaidIGV1qHdrUZ6zpf6Zl2nbr243irlSfQ5UY5VCYGzyYqmrv 1OVt5wGeZA5cTJ63a66q7tmmPvXpkQDOHnSsc9GbsvSNYJpW75YkchhLU/3Ur2+K0aLD /5sg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:user-agent :mime-version; bh=pkoJHS84eK4eH0JOIYVnps1ErLcIHBSppKLynnEUbI0=; b=Otg+qnL0LxBvSHn2XKgHM01wUJOB/4bPk7CngN0/YpMQEuGA2GI/q1Qcy9KbK18Lk3 gl8IfIUFCXmJ5KnwuRMC5R9dRD3U6XQFPnAsirbZq5yOhA4YyWPkNa3WnDNq7Al7KhN9 oNoVq+SfsZG2AOGUUeXe7W2dMRqon0TwEJ4jpMaGdpRwnUuhAi467gMEjBna+uGRB5aW pxuXoFc0+Sj8cpmudHaqbMJedfwAFLrUrE3hnQ62drxkAIxYJG2NY9LMPtCPhksNCecW eR3uIN/AX/09rMlCJ+2rMvcQXaRez1l7rtzq5MOHX7TwOynKilPx6AO/D8wQSFiXhAd7 Eztw== X-Gm-Message-State: AGRZ1gKEaFRdQkgW0/zM4S86PqGoi4jVzl8bs2OAkvFRM1L+LzXiKb44 wMoEa0gWovOUuet0/QlrK/A= X-Google-Smtp-Source: AJdET5eQZIvljbsG/ObqMon8eyCUCaywu+ZXJdYB6j4H2yyIhnJjq/xffCEMBdfusCFJhhVmLnNrEQ== X-Received: by 2002:a62:20d8:: with SMTP id m85-v6mr1964075pfj.152.1540966417280; Tue, 30 Oct 2018 23:13:37 -0700 (PDT) Received: from debian (42-3-197-089.static.netvigator.com. [42.3.197.89]) by smtp.gmail.com with ESMTPSA id q127-v6sm79460725pgq.19.2018.10.30.23.13.35 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Tue, 30 Oct 2018 23:13:36 -0700 (PDT) From: Alex Vong To: 33215@debbugs.gnu.org Subject: [PATCH 10/11] gnu: Add clojure-tools-macro. Date: Wed, 31 Oct 2018 14:13:31 +0800 Message-ID: <87d0rqfxtg.fsf@gmail.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.1 (gnu/linux) MIME-Version: 1.0 Content-Type: multipart/signed; boundary="==-=-="; micalg=pgp-sha256; protocol="application/pgp-signature" X-Spam-Score: 0.2 (/) X-Debbugs-Envelope-To: 33215 Cc: alexvong1995@gmail.com X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.8 (/) --==-=-= Content-Type: multipart/mixed; boundary="=-=-=" --=-=-= Content-Type: text/x-diff Content-Disposition: inline; filename=0010-gnu-Add-clojure-tools-macro.patch Content-Transfer-Encoding: quoted-printable From=2049e2e0297ed26ce7c753d5abd0bcdaf3f636384b Mon Sep 17 00:00:00 2001 From: Alex Vong Date: Sun, 14 Oct 2018 19:37:40 +0800 Subject: [PATCH 10/11] gnu: Add clojure-tools-macro. * gnu/packages/lisp.scm (clojure-tools-macro): New public variable. =2D-- gnu/packages/lisp.scm | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) diff --git a/gnu/packages/lisp.scm b/gnu/packages/lisp.scm index 78a74e981..9fda122cc 100644 =2D-- a/gnu/packages/lisp.scm +++ b/gnu/packages/lisp.scm @@ -1707,6 +1707,28 @@ tree. (home-page "https://github.com/Engelberg/instaparse") (license license:epl1.0)))) =20 +(define-public clojure-tools-macro + (package + (name "clojure-tools-macro") + (version "0.1.5") + (source + (origin + (method url-fetch) + (uri + (string-append "https://github.com/clojure/tools.macro/archive" + "/tools.macro-" version ".tar.gz")) + (sha256 + (base32 "0fs64a0g63xx6g7sj6vrsqknhl90s0isf6k053nw8vv5prfzc7v6")))) + (build-system clojure-build-system) + (arguments + '(#:source-dirs '("src/main/clojure/") + #:test-dirs '("src/test/clojure/") + #:doc-dirs '())) + (synopsis "Utilities for macro writers") + (description "Tools for writing macros.") + (home-page "https://github.com/clojure/tools.macro") + (license license:epl1.0))) + (define-public confusion-mdl (let* ((commit "12a055581fc262225272df43287dae48281900f5")) (package =2D-=20 2.19.1 --=-=-=-- --==-=-= Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iHUEARYIAB0WIQSof2ZdXkE0FM5aU4XzrkvbI+zaGwUCW9lICwAKCRDzrkvbI+za G4jgAQDq5M7T1gC7dW/YbPjAOFb/csC6qimvMlb8U3QVn65C+gEA7Ux2GzmUbe0W qPzB11Vua91BUpeED3wQHw9KZRC5NgE= =//am -----END PGP SIGNATURE----- --==-=-=-- From debbugs-submit-bounces@debbugs.gnu.org Wed Oct 31 02:14:22 2018 Received: (at 33215) by debbugs.gnu.org; 31 Oct 2018 06:14:23 +0000 Received: from localhost ([127.0.0.1]:56205 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1gHjlm-0006pE-Lm for submit@debbugs.gnu.org; Wed, 31 Oct 2018 02:14:22 -0400 Received: from mail-pl1-f196.google.com ([209.85.214.196]:41344) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1gHjll-0006p1-4l for 33215@debbugs.gnu.org; Wed, 31 Oct 2018 02:14:21 -0400 Received: by mail-pl1-f196.google.com with SMTP id p16-v6so596940plr.8 for <33215@debbugs.gnu.org>; Tue, 30 Oct 2018 23:14:21 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:user-agent:mime-version; bh=zF6So6/14QG9RrdjrK9t60C5biTyi2iYiQBlgnXffU8=; b=daVs3xuNU65E/EmICuPxRYbaOiOGYFHvZTVPbY9EmXqhhTeQJDDEPX27UiXFz7KvhW CtD2a3VtsJCfYqmY4lMkxG6i5dZaxjahMXcvFoWWt7chmsc9Vqapq7/epNVS7tjj2PeN W3Ew32sg8jqJoB1MJs1Qs0Nm5Owr8UaUP9QqeUoGpSOD6hKnIQr51yxetflyRYJPUKSt PU5Xv2geaLrqauBte0+kSmfbAUcQE1ElqZ7ZbuPNgs9UGcsXQj6xJZvn8En5Tp4eRVjf yB2I7TvgKaJnwhtToTe1SPh0SHbhjFtwl0Xt3pauW0fKxR39XbjCje0vwNZdymgKR7IM O3yg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:user-agent :mime-version; bh=zF6So6/14QG9RrdjrK9t60C5biTyi2iYiQBlgnXffU8=; b=n3bj1dV1MoPzXb1v7TaYdnhnEiiJPMqEHUWTPxh736NJK/6K6FL6vddkuHDHlhF/wt wsy21YBp7caonHRtpj2jC1EStNXpQMt8MQKE2oqluIlc9Zh8s+1AYZy+Hl8JJ+1NQsLX V1FNP3dVshYHnoTdOR0aODqf9+WIq2f7mzzzpKRWbQGKRLjePEQV9l3cCSGlA+so6mST ivT3A3ZkeLf2Euw2THUUggogDRTjK6u0obblGha82FSpK6iG9ZU97oTT8XzI1ZepZ5kf DaK/a1GBoVfswlXd1XgNGNeQrY257uJB74OzYfT9T3UKmNWpqUNOrS4nJBxl5N95AA2W 4W2Q== X-Gm-Message-State: AGRZ1gKQt6LGKObhOV+9nkEuivGLIq0czhzkgYrBaujrya9LWg4SeyMV jLygKjLo3BBa7XbqF/aq3nc= X-Google-Smtp-Source: AJdET5cdVsYLRk8p7twXsYkIRiVqR0YKiYG0Ut5p7Lyuc6Q8m680rvPwrn6UXn2UtbPBP4U0iZTHOw== X-Received: by 2002:a17:902:61:: with SMTP id 88-v6mr1968930pla.189.1540966455584; Tue, 30 Oct 2018 23:14:15 -0700 (PDT) Received: from debian (42-3-197-089.static.netvigator.com. [42.3.197.89]) by smtp.gmail.com with ESMTPSA id s2-v6sm61610456pfk.133.2018.10.30.23.14.14 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Tue, 30 Oct 2018 23:14:15 -0700 (PDT) From: Alex Vong To: 33215@debbugs.gnu.org Subject: [PATCH 11/11] gnu: Add clojure-algo-monads. Date: Wed, 31 Oct 2018 14:14:09 +0800 Message-ID: <878t2efxse.fsf@gmail.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.1 (gnu/linux) MIME-Version: 1.0 Content-Type: multipart/signed; boundary="==-=-="; micalg=pgp-sha256; protocol="application/pgp-signature" X-Spam-Score: 0.3 (/) X-Debbugs-Envelope-To: 33215 Cc: alexvong1995@gmail.com X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.7 (/) --==-=-= Content-Type: multipart/mixed; boundary="=-=-=" --=-=-= Content-Type: text/x-diff Content-Disposition: inline; filename=0011-gnu-Add-clojure-algo-monads.patch Content-Transfer-Encoding: quoted-printable From=2071e3bdb546ca258debf56ecdd60df86610a4cadc Mon Sep 17 00:00:00 2001 From: Alex Vong Date: Sun, 14 Oct 2018 20:15:02 +0800 Subject: [PATCH 11/11] gnu: Add clojure-algo-monads. * gnu/packages/lisp.scm (clojure-algo-monads): New public variable. =2D-- gnu/packages/lisp.scm | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) diff --git a/gnu/packages/lisp.scm b/gnu/packages/lisp.scm index 9fda122cc..aa8963fee 100644 =2D-- a/gnu/packages/lisp.scm +++ b/gnu/packages/lisp.scm @@ -1628,6 +1628,33 @@ that can be implemented for any data type.") (home-page "https://github.com/clojure/algo.generic") (license license:epl1.0))) =20 +(define-public clojure-algo-monads + (package + (name "clojure-algo-monads") + (version "0.1.6") + (source + (origin + (method url-fetch) + (uri + (string-append "https://github.com/clojure/algo.monads/archive" + "/algo.monads-" version ".tar.gz")) + (sha256 + (base32 "14gbvfgmrda990h45yn7zag83vp1kdkz4f4yzmyvkr0sjihlgdmq")))) + (build-system clojure-build-system) + (arguments + '(#:source-dirs '("src/main/clojure/") + #:test-dirs '("src/test/clojure/") + #:doc-dirs '())) + (native-inputs + `(("clojure-tools-macro" ,clojure-tools-macro))) + (synopsis + "Monad Macros and Definitions") + (description + "This library contains the most commonly used monads as well as macro= s for +defining and using monads and useful monadic functions.") + (home-page "https://github.com/clojure/algo.monads") + (license license:epl1.0))) + (define-public clojure-core-match (let ((commit "1837ffbd4a150e8f3953b2d9ed5cf4a4ad3720a7") (revision "1")) ; this is the 1st commit buildable with clojure 1.9 =2D-=20 2.19.1 --=-=-=-- --==-=-= Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iHUEARYIAB0WIQSof2ZdXkE0FM5aU4XzrkvbI+zaGwUCW9lIMQAKCRDzrkvbI+za G1+WAP9SFu+Tcohc0tnAgpdt1Uq9pe86IVN/6/SwLCU7T+y1FwEAtxg25Y7/AkpK tUXDDyacpBGDZWkvhzC7pglub7pp+w8= =+zlQ -----END PGP SIGNATURE----- --==-=-=-- From debbugs-submit-bounces@debbugs.gnu.org Mon Nov 19 07:53:19 2018 Received: (at 33215-done) by debbugs.gnu.org; 19 Nov 2018 12:53:19 +0000 Received: from localhost ([127.0.0.1]:59724 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1gOj3H-0004k0-08 for submit@debbugs.gnu.org; Mon, 19 Nov 2018 07:53:19 -0500 Received: from dd26836.kasserver.com ([85.13.145.193]:34668) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1gOj3F-0004jr-El for 33215-done@debbugs.gnu.org; Mon, 19 Nov 2018 07:53:17 -0500 Received: from localhost (178.113.147.9.wireless.dyn.drei.com [178.113.147.9]) by dd26836.kasserver.com (Postfix) with ESMTPSA id CC2533363846; Mon, 19 Nov 2018 13:53:15 +0100 (CET) Date: Mon, 19 Nov 2018 13:53:10 +0100 From: Danny Milosavljevic To: Alex Vong Subject: Re: [bug#33215] [PATCH 00/11] build-system: Add 'clojure-build-system'. Message-ID: <20181119135310.74b3085f@scratchpost.org> In-Reply-To: <87muquhcw3.fsf@gmail.com> References: <87muquhcw3.fsf@gmail.com> X-Mailer: Claws Mail 3.17.1 (GTK+ 2.24.32; x86_64-unknown-linux-gnu) MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; boundary="Sig_/fipTqri2e/OYnRAadTRRufR"; protocol="application/pgp-signature" X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 33215-done Cc: 33215-done@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.7 (-) --Sig_/fipTqri2e/OYnRAadTRRufR Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: quoted-printable I pushed this patchset to master. --Sig_/fipTqri2e/OYnRAadTRRufR Content-Type: application/pgp-signature Content-Description: OpenPGP digital signature -----BEGIN PGP SIGNATURE----- iQEzBAEBCAAdFiEEds7GsXJ0tGXALbPZ5xo1VCwwuqUFAlvysjYACgkQ5xo1VCww uqVbUgf/bT+3ZPPOryFQwgcr22Zj6Q7/1Z/7qFbRV1jq6UU2Pvt9etcWmxeKUpn1 VcIf5Gqv7pLPlF0WzLx835fklDNn87CZ8D6EnZzjlp8QJoANvfRaasf9dilQPg81 JvB3P6i2wC9kbJgFfvSQiCj5JmE82IbB8owFScfVkYAYfeepbEGqgNskGYD8O8FV USDFrWuAtaXeS4SzY+Qy0grueWUKPvRrjRrLXAjn9C8v4lyBXB8uytTMA6dA/QBc NKzIHLZVH4EeJG9DI+zzjX4PCmf0s1slw9VAIYHOyIfUyH89OTJYFTxpv+p+0t9B UOXBMhIt/kfLZUkoJ4Yh9RjLbOXWwQ== =TUZs -----END PGP SIGNATURE----- --Sig_/fipTqri2e/OYnRAadTRRufR-- From debbugs-submit-bounces@debbugs.gnu.org Tue Nov 20 16:55:41 2018 Received: (at 33215) by debbugs.gnu.org; 20 Nov 2018 21:55:41 +0000 Received: from localhost ([127.0.0.1]:37511 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1gPDzh-0001ri-4N for submit@debbugs.gnu.org; Tue, 20 Nov 2018 16:55:41 -0500 Received: from eggs.gnu.org ([208.118.235.92]:40506) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1gPDzf-0001rT-EI for 33215@debbugs.gnu.org; Tue, 20 Nov 2018 16:55:39 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1gPDzY-0002BH-W6 for 33215@debbugs.gnu.org; Tue, 20 Nov 2018 16:55:34 -0500 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00 autolearn=disabled version=3.3.2 Received: from fencepost.gnu.org ([2001:4830:134:3::e]:32885) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gPDzV-00025k-DT; Tue, 20 Nov 2018 16:55:29 -0500 Received: from [2a01:e0a:1d:7270:af76:b9b:ca24:c465] (port=37072 helo=ribbon) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1gPDzV-0004xu-57; Tue, 20 Nov 2018 16:55:29 -0500 From: ludo@gnu.org (Ludovic =?utf-8?Q?Court=C3=A8s?=) To: Alex Vong Subject: Re: [bug#33215] [PATCH 05/11] guix: Add clojure-utils. References: <87muquhcw3.fsf@gmail.com> <871s86hck1.fsf@gmail.com> Date: Tue, 20 Nov 2018 22:55:27 +0100 In-Reply-To: <871s86hck1.fsf@gmail.com> (Alex Vong's message of "Wed, 31 Oct 2018 14:09:50 +0800") Message-ID: <87tvkbv2gg.fsf@gnu.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.1 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 2001:4830:134:3::e X-Spam-Score: -5.0 (-----) X-Debbugs-Envelope-To: 33215 Cc: Danny Milosavljevic , 33215@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -6.0 (------) Hello! I=E2=80=99m late to the party but I think there are things worth discussing here. Danny, for non-trivial bits, in particular in the (guix =E2=80=A6) n= ame space, I think we should ping people to get more detailed review before merging. Alex Vong skribis: > From 857cce37325f01c26f79a6e15e33d7988ea4a0a2 Mon Sep 17 00:00:00 2001 > From: Alex Vong > Date: Sun, 14 Oct 2018 03:09:48 +0800 > Subject: [PATCH 05/11] guix: Add clojure-utils. > > * guix/build/clojure-utils.scm: New file. > * gnu/packages/lisp.scm (clojure)[arguments]: Use it. > * Makefile.am (MODULES): Add it. [...] > +(define-module (guix build clojure-utils) > + #:use-module (guix build utils) > + #:use-module (ice-9 ftw) > + #:use-module (ice-9 regex) > + #:use-module (srfi srfi-1) > + #:use-module (srfi srfi-26) > + #:export (%clojure-regex > + define-with-docs > + install-doc)) > + > +(define-syntax-rule (define-with-docs name docs val) > + "Create top-level variable named NAME with doc string DOCS and value V= AL." > + (begin (define name val) > + (set-object-property! name 'documentation docs))) This is not necessarily a bad idea, but in general I=E2=80=99m very much in favor of consistency: since we don=E2=80=99t use this anywhere else, I=E2= =80=99d rather not have it here either. We could discuss it separately, but IMO it shouldn=E2=80=99t be buried in a Clojure patch. Thus I=E2=80=99d be in favor of using the same style in this file as in the= rest of Guix. WDYT? Thanks, Ludo=E2=80=99. From debbugs-submit-bounces@debbugs.gnu.org Tue Nov 20 17:03:13 2018 Received: (at 33215) by debbugs.gnu.org; 20 Nov 2018 22:03:13 +0000 Received: from localhost ([127.0.0.1]:37516 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1gPE6x-00024u-Vf for submit@debbugs.gnu.org; Tue, 20 Nov 2018 17:03:12 -0500 Received: from eggs.gnu.org ([208.118.235.92]:45977) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1gPE6u-00024e-JP for 33215@debbugs.gnu.org; Tue, 20 Nov 2018 17:03:09 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1gPE6o-0007Bj-E2 for 33215@debbugs.gnu.org; Tue, 20 Nov 2018 17:03:03 -0500 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00 autolearn=disabled version=3.3.2 Received: from fencepost.gnu.org ([2001:4830:134:3::e]:33002) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gPE6o-0007BZ-AA; Tue, 20 Nov 2018 17:03:02 -0500 Received: from [2a01:e0a:1d:7270:af76:b9b:ca24:c465] (port=41084 helo=ribbon) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1gPE6o-0006fQ-0x; Tue, 20 Nov 2018 17:03:02 -0500 From: ludo@gnu.org (Ludovic =?utf-8?Q?Court=C3=A8s?=) To: Alex Vong Subject: Re: [bug#33215] [PATCH 06/11] build-system: Add 'clojure-build-system'. References: <87muquhcw3.fsf@gmail.com> <87wopyfxyl.fsf@gmail.com> Date: Tue, 20 Nov 2018 23:03:00 +0100 In-Reply-To: <87wopyfxyl.fsf@gmail.com> (Alex Vong's message of "Wed, 31 Oct 2018 14:10:26 +0800") Message-ID: <87in0rv23v.fsf@gnu.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.1 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 2001:4830:134:3::e X-Spam-Score: -5.0 (-----) X-Debbugs-Envelope-To: 33215 Cc: 33215@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -6.0 (------) Alex Vong skribis: > From c7a763cfa2543119cc707b434efc8680f73f6367 Mon Sep 17 00:00:00 2001 > From: Alex Vong > Date: Thu, 25 Oct 2018 05:44:01 +0800 > Subject: [PATCH 06/11] build-system: Add 'clojure-build-system'. > > * guix/build-system/clojure.scm, guix/build/clojure-build-system.scm: New > files. > * guix/build/clojure-utils.scm (@*, @@*): New macros. > (%source-dirs, %test-dirs, %compile-dir, %main-class, %omit-source?, > %aot-include, %aot-exclude, %tests?, %test-include, %test-exclude, > %clojure-regex): New variables. > (package-name->jar-names, canonicalize-relative-path, find-files*, > file-sans-extension, relative-path->clojure-lib-string, find-clojure-libs, > compiled-from?, include-list\exclude-list, eval-with-clojure, create-jar): > New procedures. > * Makefile.am (MODULES): Add them. > * doc/guix.texi (Build Systems): Document 'clojure-build-system'. [...] > +(define-with-docs canonicalize-relative-path > + "Like 'canonicalize-path', but for relative paths. > +Canonicalizations requiring the path to exist are omitted." > + (let ((remove.. (lambda (ls) > + (fold-right (match-lambda* > + (((and comp (not "..")) (".." comps ..= .)) > + comps) > + ((comp (comps ...)) > + (cons comp comps))) > + '() > + ls)))) > + (compose (match-lambda > + (() ".") > + (ls (string-join ls "/"))) > + remove.. > + (cut remove (cut member <> '("" ".")) <>) Guile has built-in =E2=80=9Crelative file name canonicalization=E2=80=9D, s= ee =E2=80=98%file-port-name-canonicalization=E2=80=99. Could it be used here? I think the use of =E2=80=98compose=E2=80=99 above is abusive, as explained= at (info "(guix) Formatting Code"). Also I=E2=80=99m not too keen on identifiers that happen to be recognized b= ut are not quite R5RS: =E2=80=98remove..=E2=80=99, =E2=80=98include-list\exclu= de-list=E2=80=99, etc. It would be safer to just stick to the same conventions as elsewhere. Ludo=E2=80=99. From debbugs-submit-bounces@debbugs.gnu.org Wed Nov 21 09:36:23 2018 Received: (at 33215) by debbugs.gnu.org; 21 Nov 2018 14:36:23 +0000 Received: from localhost ([127.0.0.1]:38003 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1gPTc6-0003Gj-SY for submit@debbugs.gnu.org; Wed, 21 Nov 2018 09:36:23 -0500 Received: from mail-pl1-f194.google.com ([209.85.214.194]:38704) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1gPTc4-0003GV-2L for 33215@debbugs.gnu.org; Wed, 21 Nov 2018 09:36:20 -0500 Received: by mail-pl1-f194.google.com with SMTP id e5so5808070plb.5 for <33215@debbugs.gnu.org>; Wed, 21 Nov 2018 06:36:19 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:cc:subject:references:date:in-reply-to:message-id :user-agent:mime-version; bh=TiU4TerYPoHh9qwiGOUysAeT0adXJ6VTgpb5qAO6X3g=; b=qp2sNjnFavPiZnO2JgoKyDV//vtFFu2h93iXTkk2rlYJ0u8rZDjdgRXzW75mdA3Xr5 83iwG6dH37IzmwEUtWW+9OwfIefQUmdvCVTY8Y62UXORqHQUk36AOypDmFiM40SPKHyk /aP+b7r/JVJjRhL2Td9nisW1fm4V/n/oRU7svdpnAO6iDqN2Gwjb10XpZvSzgpWiB6li nZnj71jAiKUltg1iQHZhc1US1YzA75dk3rJUsYi32j8eKjuSa/AyKpNDo8n8uFdIxdmr HuMkQqWw7/8AZOrvtUqbtTcMro632rswArrfGuPH95N9KZ3mv6B48OF24UXvdiUztWSx kaHQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:cc:subject:references:date :in-reply-to:message-id:user-agent:mime-version; bh=TiU4TerYPoHh9qwiGOUysAeT0adXJ6VTgpb5qAO6X3g=; b=ZrxuZLf0xSvi4OuoMzzsA1h6FuZUik4iiONRTiwXtHGJuo71T8n3POz4HvZY0A6jJT eZq7W6P9HkynZuMlQ6WNJja0muEEv40PdasQ+N3e3ODY3EIaeF6c55ZjybbqIcU3Eybm VBKp4gEC0HbBN5GdVdjGczqSMlMzqeJ/QE0A5kD3N0y/CVqvga2jDTDCzI13NYxWVGD1 LFwNJT8KGWss8k61q6CAbMTAnJDeCkw32j6i6P3xSylrJ8knI+d+weAuacba2GqfAI/r XtpNW9PVqwJZxcyM6+WXBQQFhXa1gvCFnyPHbm9XSuWWHyLsGlc/YovoISYT2A7+0qb0 z6lQ== X-Gm-Message-State: AA+aEWYkSGZO1rrj00t4K3T2wXp2oNPv8V0Ig/ZF3Dkmp5vMvVDngvKN zpPeDsJDcdnKTzAYz07VJxk= X-Google-Smtp-Source: AFSGD/UA/YTpRESMFhupFcVX6ujUuWCcBPcWKSYBP+Qh0CDvbICGQ45eZesy+f4r5/n/kd+fY05PAQ== X-Received: by 2002:a17:902:209:: with SMTP id 9mr6011256plc.288.1542810974160; Wed, 21 Nov 2018 06:36:14 -0800 (PST) Received: from debian (42-3-197-124.static.netvigator.com. [42.3.197.124]) by smtp.gmail.com with ESMTPSA id d69sm35029246pfg.168.2018.11.21.06.36.11 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Wed, 21 Nov 2018 06:36:13 -0800 (PST) From: Alex Vong To: ludo@gnu.org (Ludovic =?utf-8?Q?Court=C3=A8s?=) Subject: Re: [bug#33215] [PATCH 05/11] guix: Add clojure-utils. References: <87muquhcw3.fsf@gmail.com> <871s86hck1.fsf@gmail.com> <87tvkbv2gg.fsf@gnu.org> Date: Wed, 21 Nov 2018 22:35:54 +0800 In-Reply-To: <87tvkbv2gg.fsf@gnu.org> ("Ludovic \=\?utf-8\?Q\?Court\=C3\=A8s\=22'\?\= \=\?utf-8\?Q\?s\?\= message of "Tue, 20 Nov 2018 22:55:27 +0100") Message-ID: <875zwq8pmd.fsf@gmail.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.1 (gnu/linux) MIME-Version: 1.0 Content-Type: multipart/signed; boundary="=-=-="; micalg=pgp-sha256; protocol="application/pgp-signature" X-Spam-Score: 0.3 (/) X-Debbugs-Envelope-To: 33215 Cc: Danny Milosavljevic , 33215@debbugs.gnu.org, alexvong1995@gmail.com X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.7 (/) --=-=-= Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Hello, ludo@gnu.org (Ludovic Court=C3=A8s) writes: > Hello! > > I=E2=80=99m late to the party but I think there are things worth discussi= ng > here. Danny, for non-trivial bits, in particular in the (guix =E2=80=A6)= name > space, I think we should ping people to get more detailed review before > merging. > > Alex Vong skribis: > >> From 857cce37325f01c26f79a6e15e33d7988ea4a0a2 Mon Sep 17 00:00:00 2001 >> From: Alex Vong >> Date: Sun, 14 Oct 2018 03:09:48 +0800 >> Subject: [PATCH 05/11] guix: Add clojure-utils. >> >> * guix/build/clojure-utils.scm: New file. >> * gnu/packages/lisp.scm (clojure)[arguments]: Use it. >> * Makefile.am (MODULES): Add it. > > [...] > >> +(define-module (guix build clojure-utils) >> + #:use-module (guix build utils) >> + #:use-module (ice-9 ftw) >> + #:use-module (ice-9 regex) >> + #:use-module (srfi srfi-1) >> + #:use-module (srfi srfi-26) >> + #:export (%clojure-regex >> + define-with-docs >> + install-doc)) >> + >> +(define-syntax-rule (define-with-docs name docs val) >> + "Create top-level variable named NAME with doc string DOCS and value = VAL." >> + (begin (define name val) >> + (set-object-property! name 'documentation docs))) > > This is not necessarily a bad idea, but in general I=E2=80=99m very much = in > favor of consistency: since we don=E2=80=99t use this anywhere else, I=E2= =80=99d rather > not have it here either. We could discuss it separately, but IMO it > shouldn=E2=80=99t be buried in a Clojure patch. > > Thus I=E2=80=99d be in favor of using the same style in this file as in t= he rest > of Guix. > > WDYT? > No problem, I am happy to replace the doc string by a comment instead. IMO, providing doc string for variables in addition to procedures is more consistent [in a different way :)] since a procedure is just a special kind of variable. For example, 'defvar' in Emacs allows one to specify a doc string. Besides, I thought it is okay to use custom syntactic form within a module (as long as it doesn't break other's code). However, I can see that the way I use it can be confusing since everyone are used to defining variable via 'define'. Is this what you have in mind when you wrote that you are in favor of consistency? > Thanks, > Ludo=E2=80=99. Cheers, Alex --=-=-= Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iHUEARYIAB0WIQQwb8uPLAHCXSnTBVZh71Au9gJS8gUCW/VtSgAKCRBh71Au9gJS 8m/DAP0TKEdc9eUU5hENNYQOyzaZGPMTxYSseOQMBBO5mJCIvgEAyfAIisOiiuuP HWKx9vy2NseHoQNmihkxzomu8Rh1EAY= =4r3Q -----END PGP SIGNATURE----- --=-=-=-- From debbugs-submit-bounces@debbugs.gnu.org Wed Nov 21 17:12:30 2018 Received: (at 33215) by debbugs.gnu.org; 21 Nov 2018 22:12:30 +0000 Received: from localhost ([127.0.0.1]:40287 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1gPajV-00041E-CW for submit@debbugs.gnu.org; Wed, 21 Nov 2018 17:12:29 -0500 Received: from eggs.gnu.org ([208.118.235.92]:43337) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1gPajT-00040z-Aq for 33215@debbugs.gnu.org; Wed, 21 Nov 2018 17:12:27 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1gPajN-0008Gv-0X for 33215@debbugs.gnu.org; Wed, 21 Nov 2018 17:12:22 -0500 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00 autolearn=disabled version=3.3.2 Received: from fencepost.gnu.org ([2001:4830:134:3::e]:58815) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gPajG-0008Cs-A8; Wed, 21 Nov 2018 17:12:16 -0500 Received: from [2a01:e0a:1d:7270:af76:b9b:ca24:c465] (port=48896 helo=ribbon) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1gPajG-0004RL-14; Wed, 21 Nov 2018 17:12:14 -0500 From: ludo@gnu.org (Ludovic =?utf-8?Q?Court=C3=A8s?=) To: Alex Vong Subject: Re: [bug#33215] [PATCH 05/11] guix: Add clojure-utils. References: <87muquhcw3.fsf@gmail.com> <871s86hck1.fsf@gmail.com> <87tvkbv2gg.fsf@gnu.org> <875zwq8pmd.fsf@gmail.com> X-URL: http://www.fdn.fr/~lcourtes/ X-Revolutionary-Date: 1 Frimaire an 227 de la =?utf-8?Q?R=C3=A9volution?= X-PGP-Key-ID: 0x090B11993D9AEBB5 X-PGP-Key: http://www.fdn.fr/~lcourtes/ludovic.asc X-PGP-Fingerprint: 3CE4 6455 8A84 FDC6 9DB4 0CFB 090B 1199 3D9A EBB5 X-OS: x86_64-pc-linux-gnu Date: Wed, 21 Nov 2018 23:12:12 +0100 In-Reply-To: <875zwq8pmd.fsf@gmail.com> (Alex Vong's message of "Wed, 21 Nov 2018 22:35:54 +0800") Message-ID: <878t1mqdvn.fsf@gnu.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.1 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 2001:4830:134:3::e X-Spam-Score: -5.0 (-----) X-Debbugs-Envelope-To: 33215 Cc: Danny Milosavljevic , 33215@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -6.0 (------) Hi Alex, Alex Vong skribis: > ludo@gnu.org (Ludovic Court=C3=A8s) writes: [...] >>> +(define-syntax-rule (define-with-docs name docs val) >>> + "Create top-level variable named NAME with doc string DOCS and value= VAL." >>> + (begin (define name val) >>> + (set-object-property! name 'documentation docs))) >> >> This is not necessarily a bad idea, but in general I=E2=80=99m very much= in >> favor of consistency: since we don=E2=80=99t use this anywhere else, I= =E2=80=99d rather >> not have it here either. We could discuss it separately, but IMO it >> shouldn=E2=80=99t be buried in a Clojure patch. >> >> Thus I=E2=80=99d be in favor of using the same style in this file as in = the rest >> of Guix. >> >> WDYT? >> > No problem, I am happy to replace the doc string by a comment > instead. IMO, providing doc string for variables in addition to > procedures is more consistent [in a different way :)] since a procedure > is just a special kind of variable. For example, 'defvar' in Emacs > allows one to specify a doc string. Yeah, that=E2=80=99s why I think it=E2=80=99s not necessarily a bad idea in= itself, it=E2=80=99s just something we don=E2=80=99t currently do in Guile Scheme. :-) > Besides, I thought it is okay to use custom syntactic form within a > module (as long as it doesn't break other's code). However, I can see > that the way I use it can be confusing since everyone are used to > defining variable via 'define'. Is this what you have in mind when you > wrote that you are in favor of consistency? Yes, I think it makes it easier for people to find their way in the code base and get started hacking it if it has somewhat consistent conventions. Of course coding style may vary a bit from module to module and that=E2=80=99s fine, but overall I think we should try to use the same =E2=80=9Cbase language=E2=80=9D so to speak. WDYT? Having said that, I realize I was probably too grumpy when I wrote this, and I didn=E2=80=99t mention the main point, which is that this Clojure bui= ld system looks really nice to me! It=E2=80=99ll surely make it easier to add= more Clojure packages=E2=80=94now all we need is an importer to make that even smoother. :-) Thank you, Ludo=E2=80=99. From unknown Sat Jun 14 03:51:13 2025 Received: (at fakecontrol) by fakecontrolmessage; To: internal_control@debbugs.gnu.org From: Debbugs Internal Request Subject: Internal Control Message-Id: bug archived. Date: Thu, 20 Dec 2018 12:24:04 +0000 User-Agent: Fakemail v42.6.9 # This is a fake control message. # # The action: # bug archived. thanks # This fakemail brought to you by your local debbugs # administrator