diff mbox series

[bug#53765,v2,17/18] gnu: clojure-tools-deps-alpha: Fix issues with S3

Message ID 87pmmmcbj1.fsf@reilysiegel.com
State New
Headers show
Series None | expand

Commit Message

Reily Siegel March 16, 2022, 12:44 p.m. UTC
* gnu/packages/clojure.scm (clojure-tools-deps-alpha): Remove a restriction
which prevented the S3 loader from being used due to dependency issues. Now
that clojure-core-async has been packaged, this restriction can be lifted.
---
 gnu/packages/clojure.scm | 33 +++++++--------------------------
 1 file changed, 7 insertions(+), 26 deletions(-)

Comments

M March 26, 2022, 9:51 a.m. UTC | #1
Reily Siegel schreef op wo 16-03-2022 om 13:44 [+0100]:
>         ;; FIXME: Could not initialize class org.eclipse.aether.transport.http.SslSocketFactory
> -       #:tests? #f
> [...]
> +       #:tests? #f))

Is this still necessary, or has this been fixed by adding the
dependencies?  Looking at "guix search java-eclipse-aether", there are
a few results, so maybe all that is necessary is adding one of the
results to the native-inputs?

Greetings,
Maxime.
Ludovic Courtès March 29, 2022, 9:54 a.m. UTC | #2
Hello Maxime & Reily!

I haven’t followed closely; what’s the consensus here: would you say a
v3 is necessary?

Anyhow, I’m happy to apply when push when you deem it ready; feel free
to ping me!

Ludo’.
M March 29, 2022, 10:39 a.m. UTC | #3
Ludovic Courtès schreef op di 29-03-2022 om 11:54 [+0200]:
> Hello Maxime & Reily!
> 
> I haven’t followed closely; what’s the consensus here: would you say a
> v3 is necessary?
> 
> Anyhow, I’m happy to apply when push when you deem it ready; feel free
> to ping me!
> 
> Ludo’.

There are some problems with compiling the clojure code (AOT), though
they appear to be not exclusive to clojure-tools but possibly with the
build system -- from the discussions I've read, I guess that Clojure
macros use 'gensym', which causes build time<->runtime problems?  Or
maybe not exactly that, but something with the same effect.  And
apparently probably the dependencies are compiled instead of only the
library.

These potential compilation problems could be studied and resolved in a
separate issue/patch though (for now, AOT is being disabled).

There are also some potential license problems with
clojure-com-cognitect-aws-s3.  Upstream has been contacted for
more information
<https://github.com/cognitect-labs/aws-api/issues/208>.

Greetings,
diff mbox series

Patch

diff --git a/gnu/packages/clojure.scm b/gnu/packages/clojure.scm
index d2d5bbda48..f6169bc324 100644
--- a/gnu/packages/clojure.scm
+++ b/gnu/packages/clojure.scm
@@ -888,34 +888,11 @@  (define-public clojure-tools-deps-alpha
     (build-system clojure-build-system)
     (arguments
      `(#:source-dirs '("src/main/clojure" "src/main/resources")
+       #:java-source-dirs '("src/main/java")
        #:test-dirs '("src/test/clojure")
        #:doc-dirs '()
        ;; FIXME: Could not initialize class org.eclipse.aether.transport.http.SslSocketFactory
-       #:tests? #f
-       #:phases
-       (modify-phases %standard-phases
-         ;; FIXME: Currently, the S3 transporter depends on ClojureScript,
-         ;; which is very difficult to package due to dependencies on Java
-         ;; libraries with non-standard build systems. Instead of actually
-         ;; packaging these libraries, we just remove the S3 transporter that
-         ;; depends on them.
-         (add-after 'unpack 'remove-s3-transporter
-           (lambda _
-             (for-each delete-file
-                       (list
-                        (string-append
-                         "src/main/clojure/clojure/"
-                         "tools/deps/alpha/util/s3_aws_client.clj")
-                        (string-append
-                         "src/main/clojure/clojure/"
-                         "tools/deps/alpha/util/s3_transporter.clj")
-                        (string-append
-                         "src/test/clojure/clojure/"
-                         "tools/deps/alpha/util/test_s3_transporter.clj")))
-             (substitute*
-                 "src/main/clojure/clojure/tools/deps/alpha/util/maven.clj"
-               (("clojure.tools.deps.alpha.util.s3-transporter")
-                "")))))))
+       #:tests? #f))
     (propagated-inputs (list maven-resolver-api
                              maven-resolver-spi
                              maven-resolver-impl
@@ -927,7 +904,11 @@  (define-public clojure-tools-deps-alpha
                              maven-resolver-transport-file
                              clojure-tools-gitlibs
                              clojure-tools-cli
-                             clojure-data-xml))
+                             clojure-data-xml
+                             clojure-com-cognitect-aws-api
+                             clojure-com-cognitect-aws-endpoints
+                             clojure-com-cognitect-aws-s3
+                             java-javax-inject))
     (synopsis "Clojure library supporting clojure-tools")
     (description "This package provides a functional API for transitive
 dependency graph expansion and the creation of classpaths.")