diff mbox series

[bug#53765,10/17] gnu: Add clojure-tools-logging.

Message ID 87k0eb32c1.fsf@reilysiegel.com
State New
Headers show
Series Remove limitations on clojure-tools | expand

Checks

Context Check Description
cbaines/comparison success View comparision
cbaines/git branch success View Git branch
cbaines/applying patch success View Laminar job
cbaines/issue success View issue
cbaines/comparison success View comparision
cbaines/git branch success View Git branch
cbaines/applying patch success View Laminar job
cbaines/issue success View issue

Commit Message

Reily Siegel Feb. 4, 2022, 12:25 a.m. UTC
* gnu/packages/clojure.scm (clojure-tools-logging): New variable.
---
 gnu/packages/clojure.scm | 60 ++++++++++++++++++++++++++++++++++++++++
 1 file changed, 60 insertions(+)

Comments

M Feb. 7, 2022, 8:55 p.m. UTC | #1
Reily Siegel schreef op do 03-02-2022 om 19:25 [-0500]:
> +       ;; Tests fail due to issues with clojure.pprint
> +       #:tests? #f))

Like mentioned for another packages, in that case the tests or the main
code are broken, and in the latter case, clojure-tools-logging is
broken, so it should be fixed or at the very least upstream should be
informed, before including it in Guix.

I'll look at patches 1--10 later.

Greetings,
Maxime.
Reily Siegel Feb. 7, 2022, 10:19 p.m. UTC | #2
Maxime Devos <maximedevos@telenet.be> writes:

> Like mentioned for another packages, in that case the tests or the main
> code are broken, and in the latter case, clojure-tools-logging is
> broken, so it should be fixed or at the very least upstream should be
> informed, before including it in Guix.

This is caused by a problem with how Guix compiles clojure itself, in
the ant-build-system. I believe it has to do with preserving timestamps
on AOT compiled files, but it is not a bug I fully understand or am
qualified to fix. However, to be clear, tests upstream are fine.
M Feb. 8, 2022, 10:15 a.m. UTC | #3
Reily Siegel schreef op ma 07-02-2022 om 17:19 [-0500]:
> > Like mentioned for another packages, in that case the tests or the
> > main
> > code are broken, and in the latter case, clojure-tools-logging is
> > broken, so it should be fixed or at the very least upstream should
> > be
> > informed, before including it in Guix.
> 
> This is caused by a problem with how Guix compiles clojure itself, in
> the ant-build-system. I believe it has to do with preserving
> timestamps
> on AOT compiled files, but it is not a bug I fully understand or am
> qualified to fix. However, to be clear, tests upstream are fine.

I recommend filing a bug and linking to it from a comment next to
;; #:tests? #false.

Greetings,
Maxime.
M Feb. 8, 2022, 10:22 a.m. UTC | #4
Reily Siegel schreef op do 03-02-2022 om 19:25 [-0500]:
> +    (description "A complete Clojure reader and an EDN-only reader, works with
> +Clojure versions >= 1.4.0 and Clojurescript >=0.5308 and since version
> +0.10.0-alpha1.")

Guix only has version 1.10.0>1.4.0 of Clojure and doesn't have
Clojurescript packaged, so I don't see the point of mentioning these
version ranges.

Also, as per ‘Synopses and Descriptions’: ‘avoid using acronyms without
first introducing them’.  EDN has not been introduced.

‘Keep in mind that the synopsis must be meaningful for a very wide
audience.  For example, “Manipulate alignments in the SAM format” might
make sense for a seasoned bioinformatics researcher, but might be
fairly unhelpful or even misleading to a non-specialized audience.’

What does ‘reader’ mean here?  Is it a book explaining Clojure?  Is
it an application for helping the user with reading Clojure source
code?  Is it like Scheme's 'read' procedure or whatever wisp's 'read'
procedure is named?

What is meant by ‘complete’ here -- how does it compare to incomplete
Clojure readers?

Greetings,
Maxime.
diff mbox series

Patch

diff --git a/gnu/packages/clojure.scm b/gnu/packages/clojure.scm
index 4cd50483e3..360d86f6ab 100644
--- a/gnu/packages/clojure.scm
+++ b/gnu/packages/clojure.scm
@@ -811,3 +811,63 @@  (define-public clojure-tools-gitlibs
 indicated by git SHAs.  This library provides this functionality and also
 keeps a cache of git directories and working trees that can be reused.")
     (license license:epl1.0)))
+
+(define-public clojure-tools-logging
+  (package
+    (name "clojure-tools-logging")
+    (version "1.2.4")
+    (home-page "https://github.com/clojure/tools.logging")
+    (source (origin
+              (method git-fetch)
+              (uri (git-reference
+                    (url home-page)
+                    (commit (string-append "v" version))))
+              (file-name (git-file-name name version))
+              (sha256
+               (base32
+                "1vcl1s75amazzdyirnpza8jizp85d5178p0qkqfk26vl7yajvz7a"))))
+    (build-system clojure-build-system)
+    (native-inputs (list clojure-test-check
+                         java-slf4j-api
+                         java-slf4j-simple
+                         java-log4j-api
+                         java-log4j-core
+                         java-commons-logging-minimal))
+    (arguments
+     '(#:source-dirs '("src/main/clojure")
+       #:test-dirs '("src/test/clojure")
+       #:doc-dirs '()
+       ;; Tests fail due to issues with clojure.pprint
+       #:tests? #f))
+    (synopsis "Clojure logging toolkit")
+    (description "Logging macros which delegate to a specific logging
+implementation, selected at runtime when the @code{clojure.tools.logging}
+namespace is first loaded.")
+    (license license:epl1.0)))
+
+(define-public clojure-tools-reader
+  (package
+    (name "clojure-tools-reader")
+    (version "1.3.6")
+    (home-page "https://github.com/clojure/tools.reader")
+    (source (origin
+              (method git-fetch)
+              (uri (git-reference
+                    (url home-page)
+                    (commit (string-append "v" version))))
+              (file-name (git-file-name name version))
+              (sha256
+               (base32
+                "0rcqq024ysz5g2ad8g6jvhnlpwqym58hd1mywl8c4v3x5628d028"))))
+    (build-system clojure-build-system)
+    (arguments
+     '(#:source-dirs '("src/main/clojure")
+       #:test-dirs '("src/test/clojure")
+       #:doc-dirs '()
+       ;; Tests are not well formed clojure namespaces.
+       #:tests? #f))
+    (synopsis "Clojure reader in Clojure")
+    (description "A complete Clojure reader and an EDN-only reader, works with
+Clojure versions >= 1.4.0 and Clojurescript >=0.5308 and since version
+0.10.0-alpha1.")
+    (license license:epl1.0)))