From patchwork Wed Oct 31 06:05:37 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Alex Vong X-Patchwork-Id: 59 Return-Path: X-Original-To: patchwork@mira.cbaines.net Delivered-To: patchwork@mira.cbaines.net Received: by mira.cbaines.net (Postfix, from userid 113) id B57FC1676A; Wed, 31 Oct 2018 06:06:16 +0000 (GMT) X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on mira.cbaines.net X-Spam-Level: X-Spam-Status: No, score=-6.9 required=5.0 tests=BAYES_00,FREEMAIL_FROM, RCVD_IN_DNSWL_HI,T_DKIM_INVALID,URIBL_BLOCKED autolearn=unavailable autolearn_force=no version=3.4.0 Received: from lists.gnu.org (lists.gnu.org [IPv6:2001:4830:134:3::11]) by mira.cbaines.net (Postfix) with ESMTPS id C743F16761 for ; Wed, 31 Oct 2018 06:06:15 +0000 (GMT) Received: from localhost ([::1]:57489 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gHjdv-00027G-6I for patchwork@mira.cbaines.net; Wed, 31 Oct 2018 02:06:15 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:56674) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gHjdp-000275-NN for guix-patches@gnu.org; Wed, 31 Oct 2018 02:06:11 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1gHjdk-0007yH-Vi for guix-patches@gnu.org; Wed, 31 Oct 2018 02:06:09 -0400 Received: from debbugs.gnu.org ([208.118.235.43]:51905) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1gHjdi-0007ww-4o for guix-patches@gnu.org; Wed, 31 Oct 2018 02:06:03 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1gHjdh-0006ai-V5 for guix-patches@gnu.org; Wed, 31 Oct 2018 02:06:01 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#33215] [PATCH 01/11] gnu: clojure: Move from java to lisp. References: <87muquhcw3.fsf@gmail.com> In-Reply-To: <87muquhcw3.fsf@gmail.com> Resent-From: Alex Vong Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Wed, 31 Oct 2018 06:06:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 33215 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 33215@debbugs.gnu.org Received: via spool by 33215-submit@debbugs.gnu.org id=B33215.154096595125320 (code B ref 33215); Wed, 31 Oct 2018 06:06:01 +0000 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 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 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 208.118.235.43 X-BeenThere: guix-patches@gnu.org List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: alexvong1995@gmail.com Errors-To: guix-patches-bounces+patchwork=mira.cbaines.net@gnu.org Sender: "Guix-patches" X-getmail-retrieved-from-mailbox: Patches From 49dd56fa81666077fe50b05e46228c0734201d1c 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. --- 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 --- a/gnu/packages/java.scm +++ b/gnu/packages/java.scm @@ -1803,151 +1803,6 @@ new Date();")) `(("java-junit" ,java-junit) ,@(package-inputs ant/java8))))) -(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/clojure-" - 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=1")) - (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" - "0v2a0svf1ar2y42ajxwsjr7zmm5j7pp2zwrd2jh3k7xzd1p9x1fv")) - ("data-generators-src" - ,(submodule "data.generators/archive/data.generators-" - "0.1.2" - "0kki093jp4ckwxzfnw8ylflrfqs8b1i1wi9iapmwcsy328dmgzp1")) - ("spec-alpha-src" - ,(submodule "spec.alpha/archive/spec.alpha-" - "0.1.143" - "00alf0347licdn773w2jarpllyrbl52qz4d8mw61anjksacxylzz")) - ("test-check-src" - ,(submodule "test.check/archive/test.check-" - "0.9.0" - "0p0mnyhr442bzkz0s4k5ra3i6l5lc7kp6ajaqkkyh4c2k5yck1md")) - ("test-generative-src" - ,(submodule "test.generative/archive/test.generative-" - "0.5.2" - "1pjafy1i7yblc7ixmcpfq1lfbyf3jaljvkgrajn70sws9xs7a9f8")) - ("tools-namespace-src" - ,(submodule "tools.namespace/archive/tools.namespace-" - "0.2.11" - "10baak8v0hnwz2hr33bavshm7y49mmn9zsyyms1dwjz45p5ymhy0")))) - (home-page "https://clojure.org/") - (synopsis "Lisp dialect running on the JVM") - (description "Clojure is a dynamic, general-purpose programming language, -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 dynamic -– every feature supported by Clojure is supported at runtime. Clojure -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 philosophy -and a powerful macro system. Clojure is predominantly a functional programming -language, and features a rich set of immutable, persistent data structures. -When mutable state is needed, Clojure offers a software transactional memory -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 javacc-4 (package (name "javacc") diff --git a/gnu/packages/lisp.scm b/gnu/packages/lisp.scm index c32380969..93851c1a8 100644 --- a/gnu/packages/lisp.scm +++ b/gnu/packages/lisp.scm @@ -9,6 +9,7 @@ ;;; Copyright © 2017, 2018 Efraim Flashner ;;; Copyright © 2017 Tobias Geerinckx-Rice ;;; Copyright © 2018 Benjamin Slade +;;; Copyright © 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 +(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/clojure-" + 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=1")) + (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" + "0v2a0svf1ar2y42ajxwsjr7zmm5j7pp2zwrd2jh3k7xzd1p9x1fv")) + ("data-generators-src" + ,(submodule "data.generators/archive/data.generators-" + "0.1.2" + "0kki093jp4ckwxzfnw8ylflrfqs8b1i1wi9iapmwcsy328dmgzp1")) + ("spec-alpha-src" + ,(submodule "spec.alpha/archive/spec.alpha-" + "0.1.143" + "00alf0347licdn773w2jarpllyrbl52qz4d8mw61anjksacxylzz")) + ("test-check-src" + ,(submodule "test.check/archive/test.check-" + "0.9.0" + "0p0mnyhr442bzkz0s4k5ra3i6l5lc7kp6ajaqkkyh4c2k5yck1md")) + ("test-generative-src" + ,(submodule "test.generative/archive/test.generative-" + "0.5.2" + "1pjafy1i7yblc7ixmcpfq1lfbyf3jaljvkgrajn70sws9xs7a9f8")) + ("tools-namespace-src" + ,(submodule "tools.namespace/archive/tools.namespace-" + "0.2.11" + "10baak8v0hnwz2hr33bavshm7y49mmn9zsyyms1dwjz45p5ymhy0")))) + (home-page "https://clojure.org/") + (synopsis "Lisp dialect running on the JVM") + (description "Clojure is a dynamic, general-purpose programming language, +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 dynamic +– every feature supported by Clojure is supported at runtime. Clojure +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 philosophy +and a powerful macro system. Clojure is predominantly a functional programming +language, and features a rich set of immutable, persistent data structures. +When mutable state is needed, Clojure offers a software transactional memory +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")) -- 2.19.1