all messages for Guix-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* [bug#74973] [PATCH] gnu: Fix clojure-tools.
@ 2024-12-19 14:22 Rostislav Svoboda
  2024-12-25 21:56 ` Ludovic Courtès
  0 siblings, 1 reply; 3+ messages in thread
From: Rostislav Svoboda @ 2024-12-19 14:22 UTC (permalink / raw)
  To: 74973, amorenompls; +Cc: Rostislav Svoboda

* gnu/packages/clojure.scm (clojure-tools): The AOT compiled JAR must be
included and used by the bin/clojure script.

See also
https://yhetil.org/guix-user/CAOXoXz0fKD+3B+b_y6A8MPYxZcSRDusby6VWTUy8Nnp4Y0fAzQ@mail.gmail.com/

Change-Id: I3a8221fd415631f191cbf6ddcb0e8ecbd94e389f
---
 gnu/packages/clojure.scm | 21 ++++-----------------
 1 file changed, 4 insertions(+), 17 deletions(-)

diff --git a/gnu/packages/clojure.scm b/gnu/packages/clojure.scm
index 09674f541e..6146b38753 100644
--- a/gnu/packages/clojure.scm
+++ b/gnu/packages/clojure.scm
@@ -204,18 +204,14 @@ (define-public clojure
 (define-public clojure-tools
   (package
     (name "clojure-tools")
-    (version "1.11.1.1413")
+    (version "1.12.0.1488")
     (source
      (origin
        (method url-fetch)
        (uri (string-append "https://download.clojure.org/install/clojure-tools-"
                            version
                            ".tar.gz"))
-       (sha256 (base32 "1q0z71ifdxwvyy9gvq8mx8jbygf8cszrlhb3h22walfamnisbhwk"))
-       ;; Remove AOT compiled JAR.  The other JAR only contains uncompiled
-       ;; Clojure source code.
-       (snippet
-        `(delete-file ,(string-append "clojure-tools-" version ".jar")))))
+       (sha256 (base32 "0hh78b22shj530armm9850cqr85wqdxyqfzx4qf45w5y200bw6dw"))))
     (build-system copy-build-system)
     (arguments
      `(#:install-plan
@@ -223,6 +219,7 @@ (define-public clojure-tools
          ("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/"))
        #:modules ((guix build copy-build-system)
@@ -237,17 +234,7 @@ (define-public clojure-tools
                (("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)
-                 ":"))))))))
+               (("rlwrap") (which "rlwrap"))))))))
     (inputs (list rlwrap
                   clojure
                   clojure-tools-deps

base-commit: 5634bc206d82a867850c86044c423b0a8700f34e
-- 
2.46.0





^ permalink raw reply related	[flat|nested] 3+ messages in thread

* [bug#74973] [PATCH] gnu: Fix clojure-tools.
  2024-12-19 14:22 [bug#74973] [PATCH] gnu: Fix clojure-tools Rostislav Svoboda
@ 2024-12-25 21:56 ` Ludovic Courtès
  2024-12-26 14:40   ` Rostislav Svoboda
  0 siblings, 1 reply; 3+ messages in thread
From: Ludovic Courtès @ 2024-12-25 21:56 UTC (permalink / raw)
  To: Rostislav Svoboda; +Cc: amorenompls, 74973

Hi Rostislav,

Rostislav Svoboda <rostislav.svoboda@gmail.com> skribis:

> * gnu/packages/clojure.scm (clojure-tools): The AOT compiled JAR must be
> included and used by the bin/clojure script.
>
> See also
> https://yhetil.org/guix-user/CAOXoXz0fKD+3B+b_y6A8MPYxZcSRDusby6VWTUy8Nnp4Y0fAzQ@mail.gmail.com/
>
> Change-Id: I3a8221fd415631f191cbf6ddcb0e8ecbd94e389f

[...]

>      (source
>       (origin
>         (method url-fetch)
>         (uri (string-append "https://download.clojure.org/install/clojure-tools-"
>                             version
>                             ".tar.gz"))
> -       (sha256 (base32 "1q0z71ifdxwvyy9gvq8mx8jbygf8cszrlhb3h22walfamnisbhwk"))
> -       ;; Remove AOT compiled JAR.  The other JAR only contains uncompiled
> -       ;; Clojure source code.
> -       (snippet
> -        `(delete-file ,(string-append "clojure-tools-" version ".jar")))))
> +       (sha256 (base32 "0hh78b22shj530armm9850cqr85wqdxyqfzx4qf45w5y200bw6dw"))))

The problem is that in general we don’t want to keep pre-built binaries
like this one.  Could we keep this snippet and instead find a way to
ensure that this jar is built from source and installed?

Thanks,
Ludo’.




^ permalink raw reply	[flat|nested] 3+ messages in thread

* [bug#74973] [PATCH] gnu: Fix clojure-tools.
  2024-12-25 21:56 ` Ludovic Courtès
@ 2024-12-26 14:40   ` Rostislav Svoboda
  0 siblings, 0 replies; 3+ messages in thread
From: Rostislav Svoboda @ 2024-12-26 14:40 UTC (permalink / raw)
  To: Ludovic Courtès; +Cc: amorenompls, 74973

Hello Ludo’

> Could we keep this snippet and instead find a way to ensure that this jar is built from source and installed?

Uff, we're diving into the rabbit hole here. The clojure-tools-*.jar
is built using itself and relies on a considerable number of
configuration settings and jar files. (See below.)

Cheers,
Bost

bost@ecke /tmp$ git clone https://github.com/clojure/brew-install
Clonage dans 'brew-install'...
remote: Enumerating objects: 6984, done.
remote: Counting objects: 100% (1280/1280), done.
remote: Compressing objects: 100% (89/89), done.
remote: Total 6984 (delta 1196), reused 1244 (delta 1171), pack-reused
5704 (from 1)
Réception d'objets: 100% (6984/6984), 854.54 Kio | 6.62 Mio/s, fait.
Résolution des deltas: 100% (3418/3418), fait.
bost@ecke /tmp$ cd brew-install/

bost@ecke /tmp/brew-install$ clj -Sverbose -T:build release
version      = 1.12.0.1488
install_dir  = /gnu/store/s7basyx1rffp9bnacnr90v6zscx3ch72-clojure-tools-1.12.0.1488/lib/clojure
config_dir   = /home/bost/.config/clojure
config_paths = /gnu/store/s7basyx1rffp9bnacnr90v6zscx3ch72-clojure-tools-1.12.0.1488/lib/clojure/deps.edn
/home/bost/.config/clojure/deps.edn deps.edn
cache_dir    = .cpcache
cp_file      = .cpcache/519643847.cp

Refreshing classpath
clojure-tools/
clojure-tools/clj
clojure-tools/clojure.1
clojure-tools/clj.1
clojure-tools/example-deps.edn
clojure-tools/install.sh
clojure-tools/exec.jar
clojure-tools/tools.edn
clojure-tools/clojure
clojure-tools/deps.edn
clojure-tools/clojure-tools-1.12.0.1488.jar

bost@ecke /tmp/brew-install$ clj -Stree
org.clojure/clojure 1.12.0
  . org.clojure/spec.alpha 0.5.238
  . org.clojure/core.specs.alpha 0.4.74
org.clojure/tools.deps 0.21.1460
  . org.apache.maven.resolver/maven-resolver-api 1.8.2
  . org.apache.maven.resolver/maven-resolver-spi 1.8.2
    . org.apache.maven.resolver/maven-resolver-api 1.8.2
  . org.apache.maven.resolver/maven-resolver-impl 1.8.2
    . org.apache.maven.resolver/maven-resolver-api 1.8.2
    . org.apache.maven.resolver/maven-resolver-spi 1.8.2
    . org.apache.maven.resolver/maven-resolver-named-locks 1.8.2
      . org.slf4j/slf4j-api 1.7.36
    . org.apache.maven.resolver/maven-resolver-util 1.8.2
    . org.apache.commons/commons-lang3 3.12.0
    . javax.annotation/javax.annotation-api 1.3.2
    . org.slf4j/slf4j-api 1.7.36
  . org.apache.maven.resolver/maven-resolver-util 1.8.2
    . org.apache.maven.resolver/maven-resolver-api 1.8.2
  . org.apache.maven.resolver/maven-resolver-connector-basic 1.8.2
    . org.apache.maven.resolver/maven-resolver-api 1.8.2
    . org.apache.maven.resolver/maven-resolver-spi 1.8.2
    . org.apache.maven.resolver/maven-resolver-util 1.8.2
    . org.slf4j/slf4j-api 1.7.36
  . org.apache.maven.resolver/maven-resolver-transport-file 1.8.2
    . org.apache.maven.resolver/maven-resolver-api 1.8.2
    . org.apache.maven.resolver/maven-resolver-spi 1.8.2
    . org.slf4j/slf4j-api 1.7.36
  . org.apache.maven.resolver/maven-resolver-transport-http 1.8.2
    . org.apache.maven.resolver/maven-resolver-api 1.8.2
    . org.apache.maven.resolver/maven-resolver-spi 1.8.2
    . org.apache.maven.resolver/maven-resolver-util 1.8.2
    . org.apache.httpcomponents/httpclient 4.5.13
      X org.apache.httpcomponents/httpcore 4.4.13 :older-version
      . commons-codec/commons-codec 1.11
    . org.apache.httpcomponents/httpcore 4.4.15
    . org.slf4j/jcl-over-slf4j 1.7.36
      . org.slf4j/slf4j-api 1.7.36
    . org.slf4j/slf4j-api 1.7.36
  . org.apache.maven/maven-resolver-provider 3.8.8
    . org.apache.maven/maven-model 3.8.8
      . org.codehaus.plexus/plexus-utils 3.3.1
    . org.apache.maven/maven-model-builder 3.8.8
      . org.codehaus.plexus/plexus-utils 3.3.1
      . org.codehaus.plexus/plexus-interpolation 1.26
      . javax.inject/javax.inject 1
      . org.apache.maven/maven-model 3.8.8
      . org.apache.maven/maven-artifact 3.8.8
      . org.apache.maven/maven-builder-support 3.8.8
      . org.eclipse.sisu/org.eclipse.sisu.inject 0.3.5
    . org.apache.maven/maven-repository-metadata 3.8.8
      . org.codehaus.plexus/plexus-utils 3.3.1
    X org.apache.maven.resolver/maven-resolver-api 1.6.3 :older-version
    X org.apache.maven.resolver/maven-resolver-spi 1.6.3 :older-version
    X org.apache.maven.resolver/maven-resolver-util 1.6.3 :older-version
    X org.apache.maven.resolver/maven-resolver-impl 1.6.3 :older-version
    X org.codehaus.plexus/plexus-utils 3.3.1 :superseded
    . javax.inject/javax.inject 1
  . org.apache.maven/maven-core 3.8.8
    . org.apache.maven/maven-model 3.8.8
    . org.apache.maven/maven-settings 3.8.8
      . org.codehaus.plexus/plexus-utils 3.3.1
    . org.apache.maven/maven-settings-builder 3.8.8
      . org.apache.maven/maven-builder-support 3.8.8
      . javax.inject/javax.inject 1
      . org.codehaus.plexus/plexus-interpolation 1.26
      . org.codehaus.plexus/plexus-utils 3.3.1
      . org.apache.maven/maven-settings 3.8.8
      . org.codehaus.plexus/plexus-sec-dispatcher 2.0
        . org.codehaus.plexus/plexus-utils 3.4.1 :newer-version
        . org.codehaus.plexus/plexus-cipher 2.0
          . javax.inject/javax.inject 1
        . javax.inject/javax.inject 1
    . org.apache.maven/maven-builder-support 3.8.8
    . org.apache.maven/maven-repository-metadata 3.8.8
    . org.apache.maven/maven-artifact 3.8.8
      . org.codehaus.plexus/plexus-utils 3.3.1
      X org.apache.commons/commons-lang3 3.8.1 :older-version
    . org.apache.maven/maven-plugin-api 3.8.8
      . org.apache.maven/maven-model 3.8.8
      . org.apache.maven/maven-artifact 3.8.8
      . org.eclipse.sisu/org.eclipse.sisu.plexus 0.3.5
      . org.codehaus.plexus/plexus-utils 3.3.1
      . org.codehaus.plexus/plexus-classworlds 2.6.0
    . org.apache.maven/maven-model-builder 3.8.8
    . org.apache.maven/maven-resolver-provider 3.8.8
    X org.apache.maven.resolver/maven-resolver-impl 1.6.3 :older-version
    X org.apache.maven.resolver/maven-resolver-api 1.6.3 :older-version
    X org.apache.maven.resolver/maven-resolver-spi 1.6.3 :older-version
    X org.apache.maven.resolver/maven-resolver-util 1.6.3 :older-version
    . org.apache.maven.shared/maven-shared-utils 3.3.4
    . org.eclipse.sisu/org.eclipse.sisu.plexus 0.3.5
      X javax.annotation/javax.annotation-api 1.2 :older-version
      . org.eclipse.sisu/org.eclipse.sisu.inject 0.3.5
      X org.codehaus.plexus/plexus-component-annotations 1.5.5 :older-version
      X org.codehaus.plexus/plexus-classworlds 2.5.2 :older-version
      X org.codehaus.plexus/plexus-utils 3.0.24 :older-version
    . org.eclipse.sisu/org.eclipse.sisu.inject 0.3.5
    . com.google.inject/guice$no_aop 4.2.2
      . javax.inject/javax.inject 1
      . aopalliance/aopalliance 1.0
      X com.google.guava/guava 25.1-android :excluded
    . javax.inject/javax.inject 1
    . org.codehaus.plexus/plexus-utils 3.3.1
    . org.codehaus.plexus/plexus-classworlds 2.6.0
    . org.codehaus.plexus/plexus-interpolation 1.26
    . org.codehaus.plexus/plexus-component-annotations 2.1.0
    X org.apache.commons/commons-lang3 3.8.1 :older-version
    . org.slf4j/slf4j-api 1.7.36
  . org.clojure/data.xml 0.2.0-alpha9
  . org.clojure/tools.gitlibs 2.5.197
  . org.clojure/tools.cli 1.1.230
  . com.cognitect.aws/api 0.8.692
    . org.clojure/data.json 2.5.0
    . org.clojure/tools.logging 1.2.4
    . com.cognitect/http-client 1.0.127
      . org.clojure/core.async 1.6.681
      X org.eclipse.jetty/jetty-client 9.4.53.v20231009 :excluded
      X org.eclipse.jetty/jetty-http 9.4.53.v20231009 :excluded
      X org.eclipse.jetty/jetty-util 9.4.53.v20231009 :excluded
    X org.clojure/data.xml 0.2.0-alpha8 :older-version
    . org.clojure/core.async 1.6.681
      . org.clojure/tools.analyzer.jvm 1.2.3
        . org.clojure/tools.analyzer 1.1.1
        . org.clojure/core.memoize 1.0.253
          . org.clojure/core.cache 1.0.225
            . org.clojure/data.priority-map 1.1.0
        . org.ow2.asm/asm 9.2
        . org.clojure/tools.reader 1.3.6
  . org.eclipse.jetty/jetty-http 9.4.53.v20231009
    . org.eclipse.jetty/jetty-util 9.4.53.v20231009
    . org.eclipse.jetty/jetty-io 9.4.53.v20231009
      . org.eclipse.jetty/jetty-util 9.4.53.v20231009
  . org.eclipse.jetty/jetty-client 9.4.53.v20231009
    . org.eclipse.jetty/jetty-http 9.4.53.v20231009
    . org.eclipse.jetty/jetty-io 9.4.53.v20231009
  . com.cognitect.aws/endpoints 1.1.12.718
  . com.cognitect.aws/s3 868.2.1580.0
  . javax.inject/javax.inject 1
org.slf4j/slf4j-nop 1.7.36
  . org.slf4j/slf4j-api 1.7.36




^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2024-12-26 14:43 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-12-19 14:22 [bug#74973] [PATCH] gnu: Fix clojure-tools Rostislav Svoboda
2024-12-25 21:56 ` Ludovic Courtès
2024-12-26 14:40   ` Rostislav Svoboda

Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/guix.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.