gnu: java-guice: Don't use unstable tarball.

* gnu/packages/java.scm (java-guice)[source]: Download using git-fetch.
[arguments]: Add custom 'make-files-writable phase.
(java-guice-servlet)[arguments]: Same.
This commit is contained in:
Efraim Flashner 2020-06-29 22:18:05 +03:00
parent 02b38c112e
commit b176f69fba
No known key found for this signature in database
GPG key ID: 41AAE7DCCA3D8351

View file

@ -9068,23 +9068,30 @@ (define-public java-guice
(name "java-guice") (name "java-guice")
(version "4.1") (version "4.1")
(source (origin (source (origin
(method url-fetch) (method git-fetch)
(uri (string-append "https://github.com/google/guice/archive/" (uri (git-reference
version ".tar.gz")) (url "https://github.com/google/guice")
(file-name (string-append name "-" version ".tar.gz")) (commit version)))
(file-name (git-file-name name version))
(modules '((guix build utils))) (modules '((guix build utils)))
(snippet (snippet
`(begin `(begin
(for-each delete-file (find-files "." ".*.jar")))) (for-each delete-file (find-files "." ".*.jar")) #t))
(sha256 (sha256
(base32 (base32
"0dwmqjzlavb144ywqqglj3h68hqszkff8ai0a42hyb5il0qh4rbp")))) "18im5hdfl4q1b9chww2s1ii60sn3ydyyar32a2sf2p2g8zlbdswq"))))
(build-system ant-build-system) (build-system ant-build-system)
(arguments (arguments
`(#:jar-name "java-guice.jar" `(#:jar-name "java-guice.jar"
#:jdk ,icedtea-8 #:jdk ,icedtea-8
#:tests? #f; FIXME: tests are not in a java sub directory #:tests? #f ; FIXME: tests are not in a java sub directory
#:source-dir "core/src")) #:source-dir "core/src"
#:phases
(modify-phases %standard-phases
(add-after 'unpack 'make-files-writable
(lambda _
(for-each make-file-writable (find-files "."))
#t)))))
(inputs (inputs
`(("guava" ,java-guava) `(("guava" ,java-guava)
("java-cglib" ,java-cglib) ("java-cglib" ,java-cglib)
@ -9093,7 +9100,7 @@ (define-public java-guice
("java-asm" ,java-asm))) ("java-asm" ,java-asm)))
(home-page "https://github.com/google/guice") (home-page "https://github.com/google/guice")
(synopsis "Lightweight dependency injection framework") (synopsis "Lightweight dependency injection framework")
(description "Guice is a lightweight dependency injection framework fo (description "Guice is a lightweight dependency injection framework for
Java 6 and above.") Java 6 and above.")
(license license:asl2.0))) (license license:asl2.0)))
@ -9105,7 +9112,13 @@ (define-public java-guice-servlet
`(#:jar-name "guice-servlet.jar" `(#:jar-name "guice-servlet.jar"
#:source-dir "extensions/servlet/src/" #:source-dir "extensions/servlet/src/"
#:jdk ,icedtea-8 #:jdk ,icedtea-8
#:tests? #f)); FIXME: not in a java subdir #:tests? #f ; FIXME: not in a java subdir
#:phases
(modify-phases %standard-phases
(add-after 'unpack 'make-files-writable
(lambda _
(for-each make-file-writable (find-files "."))
#t)))))
(inputs (inputs
`(("guice" ,java-guice) `(("guice" ,java-guice)
("servlet" ,java-classpathx-servletapi) ("servlet" ,java-classpathx-servletapi)