3
5
Fork 0
mirror of git://git.savannah.gnu.org/guix.git synced 2023-12-14 03:33:07 +01:00

gnu: Add clojure-tools.

* gnu/packages/clojure.scm (clojure-tools): New variable.
This commit is contained in:
Reily Siegel 2021-12-23 18:04:46 -05:00 committed by Ricardo Wurmus
parent d948e58e6a
commit 8cf2817d4c
No known key found for this signature in database
GPG key ID: 197A5888235FACAC

View file

@ -24,11 +24,13 @@
#:use-module (gnu packages)
#:use-module (gnu packages java)
#:use-module (gnu packages maven)
#:use-module (gnu packages readline)
#: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))
@ -164,6 +166,62 @@ designs.")
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"))
;; Remove AOT compiled JAR. The other JAR only contains uncompiled
;; Clojure source code.
(snippet
`(delete-file ,(string-append "clojure-tools-" version ".jar")))))
(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")))))
(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))
(home-page "https://clojure.org/releases/tools")
(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)))
(define-public clojure-algo-generic
(package
(name "clojure-algo-generic")