Skip to content

Commit 0840fee

Browse files
authored
jdk8: fix cross build (#406714)
2 parents 58261dd + 587cb48 commit 0840fee

File tree

1 file changed

+10
-1
lines changed

1 file changed

+10
-1
lines changed

pkgs/development/compilers/openjdk/generic.nix

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -255,6 +255,10 @@ stdenv.mkDerivation (finalAttrs: {
255255
# Certificates generated using perl in `installPhase`
256256
perl
257257
]
258+
++ lib.optionals (!atLeast11 && !stdenv.buildPlatform.canExecute stdenv.hostPlatform) [
259+
# Certificates generated using keytool in `installPhase`
260+
buildPackages.jdk8
261+
]
258262
++ [
259263
unzip
260264
zip
@@ -580,7 +584,12 @@ stdenv.mkDerivation (finalAttrs: {
580584
(
581585
cd $jre/lib/openjdk/jre/lib/security
582586
rm cacerts
583-
perl ${./8/generate-cacerts.pl} $jre/lib/openjdk/jre/bin/keytool ${cacert}/etc/ssl/certs/ca-bundle.crt
587+
perl ${./8/generate-cacerts.pl} ${
588+
if stdenv.buildPlatform.canExecute stdenv.hostPlatform then
589+
"$jre/lib/openjdk/jre/bin/keytool"
590+
else
591+
"keytool"
592+
} ${cacert}/etc/ssl/certs/ca-bundle.crt
584593
)
585594
''
586595
+ ''

0 commit comments

Comments
 (0)