guix-patches
[Top][All Lists]
Advanced

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

[bug#31333] [PATCH 15/22] gnu: Add groovy-json.


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

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

diff --git a/gnu/packages/groovy.scm b/gnu/packages/groovy.scm
index c2b076bd6..c0853bdc8 100644
--- a/gnu/packages/groovy.scm
+++ b/gnu/packages/groovy.scm
@@ -764,3 +764,53 @@ documentation for groovy applications.")))
     (synopsis "Groovy JMX extension")
     (description "This package contains the JMX extension of Groovy, for
 management and monitoring JVM-based solutions.")))
+
+(define groovy-json
+  (package
+    (inherit groovy-bootstrap)
+    (name "groovy-json")
+    (arguments
+     `(#:jar-name "groovy-json.jar"
+       #:test-dir "src/test"
+       #:jdk ,icedtea-8
+       #:phases
+       (modify-phases %standard-phases
+         (add-before 'configure 'chdir
+           (lambda _
+             (chdir "subprojects/groovy-json")))
+         (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-json.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 JSON")
+    (description "This package contains JSON-related utilities for groovy.")))
-- 
2.17.0






reply via email to

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