[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[bug#48735] [PATCH v2 09/10] gnu: Add clojure-tools.
From: |
Reily Siegel |
Subject: |
[bug#48735] [PATCH v2 09/10] gnu: Add clojure-tools. |
Date: |
Thu, 23 Dec 2021 18:04:46 -0500 |
* gnu/packages/clojure.scm (clojure-tools): New variable.
---
gnu/packages/clojure.scm | 63 ++++++++++++++++++++++++++++++++++++++++
1 file changed, 63 insertions(+)
diff --git a/gnu/packages/clojure.scm b/gnu/packages/clojure.scm
index 11efa89741..b091f31eca 100644
--- a/gnu/packages/clojure.scm
+++ b/gnu/packages/clojure.scm
@@ -24,12 +24,14 @@ (define-module (gnu packages clojure)
#:use-module (gnu packages)
#:use-module (gnu packages java)
#:use-module (gnu packages maven)
+ #:use-module (gnu packages readline)
#:use-module (gnu packages version-control)
#:use-module ((guix licenses) #:prefix license:)
#:use-module (guix packages)
#:use-module (guix download)
#:use-module (guix git-download)
#:use-module (guix build-system ant)
+ #:use-module (guix build-system copy)
#:use-module (guix build-system clojure)
#:use-module (ice-9 match))
@@ -165,6 +167,67 @@ (define (extract-library name)
license:asl2.0
license:cpl1.0)))))
+(define-public clojure-tools
+ (package
+ (name "clojure-tools")
+ (version "1.10.3.1040")
+ (source
+ (origin
+ (method url-fetch)
+ (uri (string-append
"https://download.clojure.org/install/clojure-tools-"
+ version
+ ".tar.gz"))
+ (sha256 (base32 "0xvr9nmk9q789vp32zmmzj4macv8v7y9ivnfd6lf7i8vxgg6hvgv"))
+ (modules '((guix build utils)))
+ ;; Remove AOT compiled JAR. The other JAR only contains
+ ;; uncompiled Clojure source code, so should be fine.
+ (snippet
+ `(begin
+ (delete-file ,(string-append "clojure-tools-" version ".jar"))
+ #t))))
+ (build-system copy-build-system)
+ (arguments
+ `(#:install-plan
+ '(("deps.edn" "lib/clojure/")
+ ("example-deps.edn" "lib/clojure/")
+ ("exec.jar" "lib/clojure/libexec/")
+ ("clojure" "bin/")
+ ("clj" "bin/"))
+ #:modules ((guix build copy-build-system)
+ (guix build utils)
+ (srfi srfi-1)
+ (ice-9 match))
+ #:phases
+ (modify-phases %standard-phases
+ (add-after 'unpack 'fix-paths
+ (lambda* (#:key outputs #:allow-other-keys)
+ (substitute* "clojure"
+ (("PREFIX") (string-append (assoc-ref outputs "out")
"/lib/clojure")))
+ (substitute* "clj"
+ (("BINDIR") (string-append (assoc-ref outputs "out") "/bin"))
+ (("rlwrap") (which "rlwrap")))
+ #true))
+ (add-after 'fix-paths 'copy-tools-deps-alpha-jar
+ (lambda* (#:key inputs outputs #:allow-other-keys)
+ (substitute* "clojure"
+ (("\\$install_dir/libexec/clojure-tools-\\$version\\.jar")
+ (string-join
+ (append-map (match-lambda
+ ((label . dir)
+ (find-files dir "\\.jar$")))
+ inputs)
+ ":"))))))))
+ (inputs (list rlwrap
+ clojure
+ clojure-tools-deps-alpha
+ java-commons-logging-minimal))
+ (synopsis "CLI tools for the Clojure programming language")
+ (description "The Clojure command line tools can be used to start
+a Clojure repl, use Clojure and Java libraries, and start Clojure
+programs.")
+ (license license:epl1.0)
+ (home-page "https://clojure.org/releases/tools")))
+
(define-public clojure-algo-generic
(package
(name "clojure-algo-generic")
--
2.34.0
- [bug#48735] [PATCH v2 01/10] gnu: Add maven-resolver-transport-file., Reily Siegel, 2021/12/23
- [bug#48735] [PATCH v2 02/10] gnu: Add maven-resolver-transport-http., Reily Siegel, 2021/12/23
- [bug#48735] [PATCH v2 03/10] build: clojure-utils: Don't try to compile Clojure, Reily Siegel, 2021/12/23
- [bug#48735] [PATCH v2 04/10] gnu: Add clojure-test-check., Reily Siegel, 2021/12/23
- [bug#48735] [PATCH v2 05/10] gnu: Add clojure-tools-gitlibs., Reily Siegel, 2021/12/23
- [bug#48735] [PATCH v2 06/10] gnu: Add clojure-data-codec., Reily Siegel, 2021/12/23
- [bug#48735] [PATCH v2 07/10] gnu: Add clojure-data-xml., Reily Siegel, 2021/12/23
- [bug#48735] [PATCH v2 08/10] gnu: Add clojure-tools-deps-alpha., Reily Siegel, 2021/12/23
- [bug#48735] [PATCH v2 09/10] gnu: Add clojure-tools.,
Reily Siegel <=
- [bug#48735] [PATCH v2 10/10] gnu: clojure: Remove wrapper in favor of using, Reily Siegel, 2021/12/23