summary refs log tree commit diff
path: root/gnu/packages/java.scm
diff options
context:
space:
mode:
authorRicardo Wurmus <rekado@elephly.net>2021-12-05 19:17:41 +0100
committerRicardo Wurmus <rekado@elephly.net>2021-12-05 19:17:41 +0100
commit9bc0f45df5d6aed217020b1183dca54989844fb0 (patch)
treed927e89949ff7f65b5059bc94273c53fd43d0763 /gnu/packages/java.scm
parent6db3c536e89deb8a204e756f427614925a7d2582 (diff)
parent10554e0a57feeea470127a1d0441957d1776b0bd (diff)
downloadguix-9bc0f45df5d6aed217020b1183dca54989844fb0.tar.gz
Merge remote-tracking branch 'origin/master' into core-updates-frozen
Diffstat (limited to 'gnu/packages/java.scm')
-rw-r--r--gnu/packages/java.scm40
1 files changed, 35 insertions, 5 deletions
diff --git a/gnu/packages/java.scm b/gnu/packages/java.scm
index 94975e565a..b929cb9381 100644
--- a/gnu/packages/java.scm
+++ b/gnu/packages/java.scm
@@ -2631,14 +2631,44 @@ new Date();"))
                ;; The build system copies a few .template files from the
                ;; source directory into the build directory and then modifies
                ;; them in-place.  So these files have to be writable.
-               (for-each
-                (lambda (file)
-                  (invoke "chmod" "u+w" file))
+               (for-each make-file-writable
                 (find-files "src/java.base/share/classes/jdk/internal/misc/"
-                            "\\.template$"))
-               #t))))))
+                            "\\.template$"))))))))
     (home-page "https://openjdk.java.net/projects/jdk/16")))
 
+(define-public openjdk17
+  (package
+    (inherit openjdk16)
+    (name "openjdk")
+    (version "17.0.1")
+    (source (origin
+              (method git-fetch)
+              (uri (git-reference
+                    (url "https://github.com/openjdk/jdk17u")
+                    (commit (string-append "jdk-" version "-ga"))))
+              (file-name (git-file-name name version))
+              (sha256
+               (base32
+                "1l1jgbz8q7zq66npfg88r0l5xga427vrz35iys09j44b6qllrldd"))))
+    (native-inputs
+     `(("autoconf" ,autoconf)
+       ("openjdk16:jdk" ,openjdk16 "jdk")
+       ("pkg-config" ,pkg-config)
+       ("unzip" ,unzip)
+       ("which" ,which)
+       ("zip" ,zip)))
+    (arguments
+     (substitute-keyword-arguments (package-arguments openjdk16)
+       ((#:phases phases)
+        `(modify-phases ,phases
+           (replace 'fix-java-shebangs
+             (lambda _
+               ;; This file was "fixed" by patch-source-shebangs, but it requires
+               ;; this exact first line.
+               (substitute* "make/data/blockedcertsconverter/blocked.certs.pem"
+                 (("^#!.*") "#! java BlockedCertsConverter SHA-256\n"))))))))
+    (home-page "https://openjdk.java.net/projects/jdk/17")))
+
 (define-public icedtea icedtea-8)