[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
22/22: gnu: Add groovy.
From: |
julien lepiller |
Subject: |
22/22: gnu: Add groovy. |
Date: |
Wed, 9 May 2018 07:38:46 -0400 (EDT) |
roptat pushed a commit to branch master
in repository guix.
commit 22103f16f213e5938a07c11e16059715a0a66dd0
Author: Julien Lepiller <address@hidden>
Date: Fri Mar 16 17:56:45 2018 +0100
gnu: Add groovy.
* gnu/packages/groovy.scm (groovy): New variable.
---
gnu/packages/groovy.scm | 94 +++++++++++++++++++++++++++++++++++++++++++++++++
1 file changed, 94 insertions(+)
diff --git a/gnu/packages/groovy.scm b/gnu/packages/groovy.scm
index 59668c8..512f9c9 100644
--- a/gnu/packages/groovy.scm
+++ b/gnu/packages/groovy.scm
@@ -1060,3 +1060,97 @@ 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"))
+ #t))))))
+ (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.")))
- branch master updated (27ba976 -> 22103f1), julien lepiller, 2018/05/09
- 03/22: gnu: Add groovy-tests-bootstrap., julien lepiller, 2018/05/09
- 05/22: gnu: Add groovy-xml., julien lepiller, 2018/05/09
- 17/22: gnu: Add groovy-nio., julien lepiller, 2018/05/09
- 19/22: gnu: Add groovy-sql., julien lepiller, 2018/05/09
- 06/22: gnu: Add groovy-templates., julien lepiller, 2018/05/09
- 09/22: gnu: Add groovy-bsf., julien lepiller, 2018/05/09
- 16/22: gnu: Add groovy-jsr223., julien lepiller, 2018/05/09
- 15/22: gnu: Add groovy-json., julien lepiller, 2018/05/09
- 18/22: gnu: Add groovy-servlet., julien lepiller, 2018/05/09
- 22/22: gnu: Add groovy.,
julien lepiller <=
- 02/22: gnu: Add groovy-bootstrap., julien lepiller, 2018/05/09
- 07/22: gnu: Add groovy-groovydoc., julien lepiller, 2018/05/09
- 11/22: gnu: Add groovy-console., julien lepiller, 2018/05/09
- 20/22: gnu: Add groovy-testng., julien lepiller, 2018/05/09
- 04/22: gnu: Add groovy-test., julien lepiller, 2018/05/09
- 13/22: gnu: Add groovy-groovysh., julien lepiller, 2018/05/09
- 12/22: gnu: Add groovy-docgenerator., julien lepiller, 2018/05/09
- 14/22: gnu: Add groovy-jmx., julien lepiller, 2018/05/09
- 01/22: gnu: Add java-groovy-bootstrap., julien lepiller, 2018/05/09
- 08/22: gnu: Add groovy-ant., julien lepiller, 2018/05/09