guix-patches
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[bug#31333] [PATCH 16/22] gnu: Add groovy-jsr223.


From: Julien Lepiller
Subject: [bug#31333] [PATCH 16/22] gnu: Add groovy-jsr223.
Date: Tue, 1 May 2018 17:44:43 +0200

* gnu/packages/groovy.scm (groovy-jsr223): New variable.
---
 gnu/packages/groovy.scm | 54 +++++++++++++++++++++++++++++++++++++++++
 1 file changed, 54 insertions(+)

diff --git a/gnu/packages/groovy.scm b/gnu/packages/groovy.scm
index c0853bdc8..f38e35a9a 100644
--- a/gnu/packages/groovy.scm
+++ b/gnu/packages/groovy.scm
@@ -814,3 +814,57 @@ management and monitoring JVM-based solutions.")))
        ,@(package-native-inputs groovy-java-bootstrap)))
     (synopsis "Groovy JSON")
     (description "This package contains JSON-related utilities for groovy.")))
+
+(define groovy-jsr223
+  (package
+    (inherit groovy-bootstrap)
+    (name "groovy-jsr223")
+    (arguments
+     `(#:jar-name "groovy-jsr223.jar"
+       #:test-dir "src/test"
+       #:jdk ,icedtea-8
+       #:phases
+       (modify-phases %standard-phases
+         (add-before 'configure 'chdir
+           (lambda _
+             (chdir "subprojects/groovy-jsr223")))
+         (add-before 'build 'copy-resources
+           (lambda _
+             (copy-recursively "src/main/resources" "build/classes")))
+         (replace 'build
+           (lambda _
+             (mkdir-p "build/classes")
+             (mkdir-p "build/jar")
+             (and
+               (zero? (apply system* "java" "-cp" (getenv "CLASSPATH")
+                               "org.codehaus.groovy.tools.FileSystemCompiler"
+                               "-d" "build/classes"
+                               "-j"; joint compilation
+                               (find-files "src/main"
+                                           ".*\\.(groovy|java)$")))
+               (zero? (system* "jar" "-cf" "build/jar/groovy-jsr223.jar"
+                               "-C" "build/classes" ".")))))
+         (replace 'check
+           (lambda _
+             (mkdir-p "build/test-classes")
+             (substitute* "build.xml"
+               (("depends=\"compile-tests\"") "depends=\"\"")
+               (("}/java") "}/groovy"))
+             (and
+               (zero? (apply system* "java" "-cp"
+                             (string-append (getenv "CLASSPATH") 
":build/classes")
+                             "org.codehaus.groovy.tools.FileSystemCompiler"
+                             "-d" "build/test-classes"
+                             "-j"
+                             (append
+                               (find-files "src/test"
+                                           ".*\\.(groovy|java)$"))))
+               (zero? (system* "ant" "check"))))))))
+    (native-inputs
+     `(("groovy-bootstrap" ,groovy-bootstrap)
+       ("groovy-test" ,groovy-test)
+       ("groovy-tests-bootstrap" ,groovy-tests-bootstrap)
+       ,@(package-native-inputs groovy-java-bootstrap)))
+    (synopsis "Groovy's own JSR223 implementation")
+    (description "This package contains Groovy's own JSR223 implementation.  
This
+module is used for interaction between Groovy and Java code.")))
-- 
2.17.0






reply via email to

[Prev in Thread] Current Thread [Next in Thread]