diff options
Diffstat (limited to 'nongnu/packages/clojure.scm')
-rw-r--r-- | nongnu/packages/clojure.scm | 110 |
1 files changed, 46 insertions, 64 deletions
diff --git a/nongnu/packages/clojure.scm b/nongnu/packages/clojure.scm index 66567bb..3ef3ff4 100644 --- a/nongnu/packages/clojure.scm +++ b/nongnu/packages/clojure.scm @@ -1,86 +1,33 @@ -;;; GNU Guix --- Functional package management for GNU +;;; SPDX-License-Identifier: GPL-3.0-or-later ;;; Copyright © 2019 Pierre Neidhardt <mail@ambrevar.xyz> ;;; Copyright © 2020 Jelle Licht <jlicht@fsfe.org> ;;; Copyright © 2020 Alex Griffin <a@ajgrf.com> -;;; -;;; This file is not 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 <http://www.gnu.org/licenses/>. (define-module (nongnu packages clojure) + #:use-module (gnu packages compression) + #:use-module (gnu packages gcc) #:use-module (gnu packages readline) - #:use-module (guix packages) #:use-module (guix build-system copy) #:use-module (guix build-system gnu) #:use-module (guix build-system trivial) #:use-module (guix download) #:use-module (guix git-download) + #:use-module (guix packages) + #:use-module (nonguix build-system binary) #:use-module ((guix licenses) #:prefix license:)) -(define-public clojure-tools - (package - (name "clojure-tools") - (version "1.10.3.943") - (source - (origin - (method url-fetch) - (uri (string-append "https://download.clojure.org/install/clojure-tools-" - version - ".tar.gz")) - (sha256 (base32 "1yrk6m9f6n8f0drpx305jb95d61py423aawkl2p6syr2kfyx2w63")))) - (build-system copy-build-system) - (arguments - `(#:install-plan - '(("deps.edn" "lib/clojure/") - ("example-deps.edn" "lib/clojure/") - ("tools.edn" "lib/clojure/") - ("exec.jar" "lib/clojure/libexec/") - (,(string-append "clojure-tools-" version ".jar") "lib/clojure/libexec/") - ("clojure" "bin/") - ("clj" "bin/")) - #: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))))) - (inputs `(("rlwrap" ,rlwrap))) - (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"))) - - ;; This is a hidden package, as it does not really serve a purpose on its own. (define leiningen-jar (package (name "leiningen-jar") - (version "2.9.7") + (version "2.10.0") (source (origin (method url-fetch) - (uri (string-append "https://github.com/technomancy/leiningen/releases/download/" - version "/leiningen-" version "-standalone.jar")) + (uri "https://codeberg.org/attachments/43cebda5-a7c2-405b-b641-5143a00051b5") (file-name "leiningen-standalone.jar") (sha256 (base32 - "00m8xbrfbkv84jncssr3jg86y6k7pc2iamvdpl7bppgcmha19w42")))) + "0d5vmpyp9ddxpj1s5c60fv2f5iimz1chbgfhchlaqxa0sfx9jwnj")))) (build-system trivial-build-system) (arguments `(#:modules ((guix build utils)) @@ -102,16 +49,16 @@ lets you focus on your code.") (package (inherit leiningen-jar) (name "leiningen") - (version "2.9.7") + (version "2.10.0") (source (origin (method git-fetch) (uri (git-reference - (url "https://github.com/technomancy/leiningen.git") + (url "https://codeberg.org/leiningen/leiningen.git") (commit version))) (file-name (git-file-name name version)) (sha256 (base32 - "1sx54g50rb6pj9mhqp77byh1ikfic7cmyifacxn4mi4a5j949kly")))) + "0xvniav6iy1yrbamvbg8i3dq8issiczv3rbig2yc3nm08d2q0rig")))) (build-system gnu-build-system) (arguments `(#:tests? #f @@ -134,3 +81,38 @@ lets you focus on your code.") #t)))))) (inputs `(("leiningen-jar" ,leiningen-jar))))) + +(define-public clj-kondo + (package + (name "clj-kondo") + (version "2023.01.20") + (source (origin + (method url-fetch/zipbomb) + (uri (string-append + "https://github.com/clj-kondo/clj-kondo/releases/download/v" + version "/clj-kondo-" version "-linux-amd64.zip")) + (sha256 + (base32 + "0i91qaqjnrg7ad0rs1r4rjwi77pr16dhck9bflb4kiyggcbs4dds")))) + (build-system binary-build-system) + (arguments + `(#:patchelf-plan + '(("clj-kondo" ("gcc:lib" "zlib"))) + #:install-plan + '(("clj-kondo" "/bin/")) + #:phases + (modify-phases %standard-phases + (add-after 'unpack 'chmod + (lambda _ + (chmod "clj-kondo" #o755)))))) + (native-inputs + `(("unzip" ,unzip))) + (inputs + `(("gcc:lib" ,gcc "lib") + ("zlib" ,zlib))) + (supported-systems '("x86_64-linux")) + (home-page "https://github.com/clj-kondo/clj-kondo") + (synopsis "Linter for Clojure code") + (description "Clj-kondo performs static analysis on Clojure, ClojureScript +and EDN, without the need of a running REPL.") + (license license:epl1.0))) |