summary refs log tree commit diff
path: root/pkgs/development/compilers/openjdk/19.nix
diff options
context:
space:
mode:
authorSandro Jäckel <sandro.jaeckel@sap.com>2023-01-31 17:55:22 +0100
committerAnderson Torres <torres.anderson.85@protonmail.com>2023-04-14 22:23:39 -0300
commit8204a95ef21d4509af5d30cf0ac48a05cee208f9 (patch)
tree142ad3e618311979a6fbee886666400c925e367d /pkgs/development/compilers/openjdk/19.nix
parent579ac201c694cb4369cb7b37ac1113c5c9e825d2 (diff)
downloadnixpkgs-8204a95ef21d4509af5d30cf0ac48a05cee208f9.tar
nixpkgs-8204a95ef21d4509af5d30cf0ac48a05cee208f9.tar.gz
nixpkgs-8204a95ef21d4509af5d30cf0ac48a05cee208f9.tar.bz2
nixpkgs-8204a95ef21d4509af5d30cf0ac48a05cee208f9.tar.lz
nixpkgs-8204a95ef21d4509af5d30cf0ac48a05cee208f9.tar.xz
nixpkgs-8204a95ef21d4509af5d30cf0ac48a05cee208f9.tar.zst
nixpkgs-8204a95ef21d4509af5d30cf0ac48a05cee208f9.zip
openjdk: bootstrap headless variant with headless openjdk
This makes bootstrapping work when environment.noXlibs is set to true
Diffstat (limited to 'pkgs/development/compilers/openjdk/19.nix')
-rw-r--r--pkgs/development/compilers/openjdk/19.nix9
1 files changed, 6 insertions, 3 deletions
diff --git a/pkgs/development/compilers/openjdk/19.nix b/pkgs/development/compilers/openjdk/19.nix
index bdcdba83a1c..190818e1fec 100644
--- a/pkgs/development/compilers/openjdk/19.nix
+++ b/pkgs/development/compilers/openjdk/19.nix
@@ -18,6 +18,9 @@ let
     build = "7";
   };
 
+  # when building a headless jdk, also bootstrap it with a headless jdk
+  openjdk-bootstrap = openjdk19-bootstrap.override { gtkSupport = !headless; };
+
   openjdk = stdenv.mkDerivation {
     pname = "openjdk" + lib.optionalString headless "-headless";
     version = "${version.feature}${version.interim}+${version.build}";
@@ -33,7 +36,7 @@ let
     buildInputs = [
       cpio file which zip perl zlib cups freetype alsa-lib libjpeg giflib
       libpng zlib lcms2 libX11 libICE libXrender libXext libXtst libXt libXtst
-      libXi libXinerama libXcursor libXrandr fontconfig openjdk19-bootstrap
+      libXi libXinerama libXcursor libXrandr fontconfig openjdk-bootstrap
     ] ++ lib.optionals (!headless && enableGnome2) [
       gtk3 gnome_vfs GConf glib
     ];
@@ -78,7 +81,7 @@ let
     '';
 
     configureFlags = [
-      "--with-boot-jdk=${openjdk19-bootstrap.home}"
+      "--with-boot-jdk=${openjdk-bootstrap.home}"
       "--with-version-build=${version.build}"
       "--with-version-opt=nixos"
       "--with-version-pre="
@@ -173,7 +176,7 @@ let
       done
     '';
 
-    disallowedReferences = [ openjdk19-bootstrap ];
+    disallowedReferences = [ openjdk-bootstrap ];
 
     pos = builtins.unsafeGetAttrPos "feature" version;
     meta = import ./meta.nix lib version.feature;