GNU bug report logs - #31333
[PATCH] Add groovy

Previous Next

Package: guix-patches;

Reported by: Julien Lepiller <julien <at> lepiller.eu>

Date: Tue, 1 May 2018 15:42:02 UTC

Severity: normal

Tags: patch

Done: Julien Lepiller <julien <at> lepiller.eu>

Bug is archived. No further changes may be made.

Full log


Message #53 received at 31333 <at> debbugs.gnu.org (full text, mbox):

From: Julien Lepiller <julien <at> lepiller.eu>
To: 31333 <at> debbugs.gnu.org
Subject: [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





This bug report was last modified 7 years and 17 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.