From: Julien Lepiller <julien@lepiller.eu>
To: 31333@debbugs.gnu.org
Subject: [bug#31333] [PATCH 22/22] gnu: Add groovy.
Date: Tue, 1 May 2018 17:44:49 +0200 [thread overview]
Message-ID: <20180501154449.3531-22-julien@lepiller.eu> (raw)
In-Reply-To: <20180501154449.3531-1-julien@lepiller.eu>
* gnu/packages/groovy.scm (groovy): New variable.
---
gnu/packages/groovy.scm | 93 +++++++++++++++++++++++++++++++++++++++++
1 file changed, 93 insertions(+)
diff --git a/gnu/packages/groovy.scm b/gnu/packages/groovy.scm
index 89a1e7e8d..981f42b6a 100644
--- a/gnu/packages/groovy.scm
+++ b/gnu/packages/groovy.scm
@@ -1090,3 +1090,96 @@ tests in Groovy.")))
(synopsis "Groovy macro processor")
(description "This package contains a high-level library to create macro
and modify groovy's @dfn{Abstract Syntax Tree} (AST).")))
+
+(define-public groovy
+ (package
+ (inherit groovy-bootstrap)
+ (name "groovy")
+ (arguments
+ `(#:tests? #f; No tests
+ #:jdk ,icedtea-8
+ #:phases
+ (modify-phases %standard-phases
+ (delete 'configure)
+ (delete 'build)
+ (replace 'install
+ (lambda* (#:key outputs inputs #:allow-other-keys)
+ (let* ((out (assoc-ref outputs "out"))
+ (out-bin (string-append out "/bin"))
+ (out-lib (string-append out "/lib")))
+ (with-directory-excursion "src/bin"
+ (substitute* "startGroovy"
+ (("\"\\\\\"") "\"")
+ (("\\\\\"\"") "\"")
+ (("\\\\\\$") "$")
+ (("@GROOVYJAR@") "groovy.jar")
+ (("MAX_FD=\"maximum\"")
+ (string-append
+ "MAX_FD=\"maximum\"\nJAVAHOME="
+ (assoc-ref inputs "jdk"))))
+ ;; Groovy uses class loading. It's not enough to put the class
+ ;; in the loader's classpath, as it causes breakages:
+ ;; the compiler would give this error:
+ ;; "Prohibited package name: java.lang"
+ ;; So we symlink dependencies in this package's output. The
+ ;; starter class (in groovy-bootstrap) is where the class loader
+ ;; will look for dependencies, so we put it there too.
+ (mkdir-p out-lib)
+ (for-each
+ (lambda (input)
+ (for-each
+ (lambda (jar)
+ (symlink jar (string-append out-lib "/" (basename jar))))
+ (find-files (assoc-ref inputs input) ".*.jar")))
+ '("groovy-bootstrap" "groovy-ant" "groovy-bsf"
+ "groovy-console" "groovy-docgenerator"
+ "groovy-groovydoc" "groovy-groovysh"
+ "groovy-jmx" "groovy-json" "groovy-jsr223"
+ "groovy-nio" "groovy-servlet" "groovy-sql"
+ "groovy-swing" "groovy-templates" "groovy-testng"
+ "java-commons-cli" "java-asm"
+ "java-classpathx-servletapi" "java-xstream"
+ "java-jansi" "java-jline-2"))
+ ;; antlr.jar is present twice in antlr2. Symlink doesn't like
+ ;; it, so we symlink it here.
+ (symlink (string-append (assoc-ref inputs "antlr2") "/lib/antlr.jar")
+ (string-append out-lib "/antlr.jar"))
+ (for-each
+ (lambda (tool)
+ (install-file tool out-bin)
+ (chmod (string-append out-bin "/" tool) #o755))
+ '("grape" "groovy" "groovyc" "groovyConsole" "groovydoc"
+ "groovysh" "java2groovy" "startGroovy")))
+ (install-file "src/conf/groovy-starter.conf"
+ (string-append out "/conf"))))))))
+ (inputs
+ `(("groovy-bootstrap" ,groovy-bootstrap)
+ ("groovy-ant" ,groovy-ant)
+ ("groovy-bsf" ,groovy-bsf)
+ ("groovy-console" ,groovy-console)
+ ("groovy-docgenerator" ,groovy-docgenerator)
+ ("groovy-groovydoc" ,groovy-groovydoc)
+ ("groovy-groovysh" ,groovy-groovysh)
+ ("groovy-jmx" ,groovy-jmx)
+ ("groovy-json" ,groovy-json)
+ ("groovy-jsr223" ,groovy-jsr223)
+ ("groovy-nio" ,groovy-nio)
+ ("groovy-servlet" ,groovy-servlet)
+ ("groovy-sql" ,groovy-sql)
+ ("groovy-swing" ,groovy-swing)
+ ("groovy-templates" ,groovy-templates)
+ ("groovy-testng" ,groovy-testng)
+ ("java-commons-cli" ,java-commons-cli)
+ ("java-asm" ,java-asm)
+ ("java-classpathx-servletapi" ,java-classpathx-servletapi)
+ ("java-xstream" ,java-xstream)
+ ("java-jansi" ,java-jansi)
+ ("java-jline-2" ,java-jline-2)
+ ("antlr2" ,antlr2)))
+ (synopsis "Programming language for the JVM")
+ (description "Apache Groovy is a powerful, optionally typed and dynamic
+language, with static-typing and static compilation capabilities, for the Java
+platform. It integrates smoothly with any Java program, and immediately
+delivers to your application powerful features, including scripting
+capabilities, Domain-Specific Language authoring, runtime and compile-time
+meta-programming and functional programming.")))
--
2.17.0
next prev parent reply other threads:[~2018-05-01 15:46 UTC|newest]
Thread overview: 49+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-05-01 15:41 [bug#31333] [PATCH] Add groovy Julien Lepiller
2018-05-01 15:44 ` [bug#31333] [PATCH 01/22] gnu: Add groovy-java-bootstrap Julien Lepiller
2018-05-01 15:44 ` [bug#31333] [PATCH 02/22] gnu: Add groovy-bootstrap Julien Lepiller
2018-05-06 17:48 ` Danny Milosavljevic
2018-05-06 18:12 ` Julien Lepiller
2018-05-01 15:44 ` [bug#31333] [PATCH 03/22] gnu: Add groovy-tests-bootstrap Julien Lepiller
2018-05-07 18:01 ` Danny Milosavljevic
2018-05-01 15:44 ` [bug#31333] [PATCH 04/22] gnu: Add groovy-test Julien Lepiller
2018-05-07 18:01 ` Danny Milosavljevic
2018-05-01 15:44 ` [bug#31333] [PATCH 05/22] gnu: Add groovy-xml Julien Lepiller
2018-05-07 18:03 ` Danny Milosavljevic
2018-05-01 15:44 ` [bug#31333] [PATCH 06/22] gnu: Add groovy-templates Julien Lepiller
2018-05-07 18:03 ` Danny Milosavljevic
2018-05-01 15:44 ` [bug#31333] [PATCH 07/22] gnu: Add groovy-groovydoc Julien Lepiller
2018-05-07 18:04 ` Danny Milosavljevic
2018-05-01 15:44 ` [bug#31333] [PATCH 08/22] gnu: Add groovy-ant Julien Lepiller
2018-05-07 18:05 ` Danny Milosavljevic
2018-05-07 19:04 ` Julien Lepiller
2018-05-01 15:44 ` [bug#31333] [PATCH 09/22] gnu: Add groovy-bsf Julien Lepiller
2018-05-07 18:07 ` Danny Milosavljevic
2018-05-01 15:44 ` [bug#31333] [PATCH 10/22] gnu: Add groovy-swing Julien Lepiller
2018-05-07 18:09 ` Danny Milosavljevic
2018-05-01 15:44 ` [bug#31333] [PATCH 11/22] gnu: Add groovy-console Julien Lepiller
2018-05-07 18:10 ` Danny Milosavljevic
2018-05-01 15:44 ` [bug#31333] [PATCH 12/22] gnu: Add groovy-docgenerator Julien Lepiller
2018-05-07 18:10 ` Danny Milosavljevic
2018-05-01 15:44 ` [bug#31333] [PATCH 13/22] gnu: Add groovy-groovysh Julien Lepiller
2018-05-07 18:11 ` Danny Milosavljevic
2018-05-01 15:44 ` [bug#31333] [PATCH 14/22] gnu: Add groovy-jmx Julien Lepiller
2018-05-07 18:13 ` Danny Milosavljevic
2018-05-01 15:44 ` [bug#31333] [PATCH 15/22] gnu: Add groovy-json Julien Lepiller
2018-05-07 18:13 ` Danny Milosavljevic
2018-05-01 15:44 ` [bug#31333] [PATCH 16/22] gnu: Add groovy-jsr223 Julien Lepiller
2018-05-07 18:14 ` Danny Milosavljevic
2018-05-01 15:44 ` [bug#31333] [PATCH 17/22] gnu: Add groovy-nio Julien Lepiller
2018-05-07 18:15 ` Danny Milosavljevic
2018-05-01 15:44 ` [bug#31333] [PATCH 18/22] gnu: Add groovy-servlet Julien Lepiller
2018-05-07 18:15 ` Danny Milosavljevic
2018-05-01 15:44 ` [bug#31333] [PATCH 19/22] gnu: Add groovy-sql Julien Lepiller
2018-05-07 18:16 ` Danny Milosavljevic
2018-05-01 15:44 ` [bug#31333] [PATCH 20/22] gnu: Add groovy-testng Julien Lepiller
2018-05-07 18:16 ` Danny Milosavljevic
2018-05-01 15:44 ` [bug#31333] [PATCH 21/22] gnu: Add groovy-macro Julien Lepiller
2018-05-07 18:17 ` Danny Milosavljevic
2018-05-01 15:44 ` Julien Lepiller [this message]
2018-05-07 19:23 ` [bug#31333] [PATCH 22/22] gnu: Add groovy Danny Milosavljevic
2018-05-07 17:58 ` [bug#31333] [PATCH 01/22] gnu: Add groovy-java-bootstrap Danny Milosavljevic
2018-05-07 19:25 ` Björn Höfling
2018-05-09 11:40 ` bug#31333: [PATCH] Add groovy Julien Lepiller
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://guix.gnu.org/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20180501154449.3531-22-julien@lepiller.eu \
--to=julien@lepiller.eu \
--cc=31333@debbugs.gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/guix.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).