From 2e07e19dbd8c1414803790894e3c5c80560e47b1 Mon Sep 17 00:00:00 2001 From: K900 Date: Sat, 15 Apr 2023 11:35:28 +0300 Subject: [PATCH] openjdk: explicitly specify build platform to avoid WSL autodetection shenanigans Fixes #204152 --- pkgs/development/compilers/openjdk/13.nix | 5 +++++ pkgs/development/compilers/openjdk/14.nix | 5 +++++ pkgs/development/compilers/openjdk/15.nix | 5 +++++ pkgs/development/compilers/openjdk/16.nix | 5 +++++ pkgs/development/compilers/openjdk/17.nix | 5 +++++ pkgs/development/compilers/openjdk/18.nix | 5 +++++ pkgs/development/compilers/openjdk/19.nix | 5 +++++ 7 files changed, 35 insertions(+) diff --git a/pkgs/development/compilers/openjdk/13.nix b/pkgs/development/compilers/openjdk/13.nix index d25d9cf90853..b012459ba046 100644 --- a/pkgs/development/compilers/openjdk/13.nix +++ b/pkgs/development/compilers/openjdk/13.nix @@ -61,6 +61,11 @@ let patchShebangs --build configure ''; + # JDK's build system attempts to specifically detect + # and special-case WSL, and we don't want it to do that, + # so pass the correct platform names explicitly + configurePlatforms = ["build" "host"]; + configureFlags = [ "--with-boot-jdk=${openjdk-bootstrap.home}" "--with-version-pre=" diff --git a/pkgs/development/compilers/openjdk/14.nix b/pkgs/development/compilers/openjdk/14.nix index fb6c742fa5a1..0f4f17d078e5 100644 --- a/pkgs/development/compilers/openjdk/14.nix +++ b/pkgs/development/compilers/openjdk/14.nix @@ -56,6 +56,11 @@ let patchShebangs --build configure ''; + # JDK's build system attempts to specifically detect + # and special-case WSL, and we don't want it to do that, + # so pass the correct platform names explicitly + configurePlatforms = ["build" "host"]; + configureFlags = [ "--with-boot-jdk=${openjdk-bootstrap.home}" "--with-version-pre=" diff --git a/pkgs/development/compilers/openjdk/15.nix b/pkgs/development/compilers/openjdk/15.nix index 35297c902b42..54bce680a188 100644 --- a/pkgs/development/compilers/openjdk/15.nix +++ b/pkgs/development/compilers/openjdk/15.nix @@ -59,6 +59,11 @@ let patchShebangs --build configure ''; + # JDK's build system attempts to specifically detect + # and special-case WSL, and we don't want it to do that, + # so pass the correct platform names explicitly + configurePlatforms = ["build" "host"]; + configureFlags = [ "--with-boot-jdk=${openjdk-bootstrap.home}" "--with-version-pre=" diff --git a/pkgs/development/compilers/openjdk/16.nix b/pkgs/development/compilers/openjdk/16.nix index ae0cb17dc4bc..802449e4027f 100644 --- a/pkgs/development/compilers/openjdk/16.nix +++ b/pkgs/development/compilers/openjdk/16.nix @@ -61,6 +61,11 @@ let patchShebangs --build configure ''; + # JDK's build system attempts to specifically detect + # and special-case WSL, and we don't want it to do that, + # so pass the correct platform names explicitly + configurePlatforms = ["build" "host"]; + configureFlags = [ "--with-boot-jdk=${openjdk-bootstrap.home}" "--with-version-build=${version.build}" diff --git a/pkgs/development/compilers/openjdk/17.nix b/pkgs/development/compilers/openjdk/17.nix index e7d5807b508d..9cb0b811b516 100644 --- a/pkgs/development/compilers/openjdk/17.nix +++ b/pkgs/development/compilers/openjdk/17.nix @@ -78,6 +78,11 @@ let patchShebangs --build configure ''; + # JDK's build system attempts to specifically detect + # and special-case WSL, and we don't want it to do that, + # so pass the correct platform names explicitly + configurePlatforms = ["build" "host"]; + configureFlags = [ "--with-boot-jdk=${openjdk-bootstrap.home}" "--with-version-build=${version.build}" diff --git a/pkgs/development/compilers/openjdk/18.nix b/pkgs/development/compilers/openjdk/18.nix index 148d2e74d6a0..48d68f7b071f 100644 --- a/pkgs/development/compilers/openjdk/18.nix +++ b/pkgs/development/compilers/openjdk/18.nix @@ -68,6 +68,11 @@ let patchShebangs --build configure ''; + # JDK's build system attempts to specifically detect + # and special-case WSL, and we don't want it to do that, + # so pass the correct platform names explicitly + configurePlatforms = ["build" "host"]; + configureFlags = [ "--with-boot-jdk=${openjdk-bootstrap.home}" "--with-version-build=${version.build}" diff --git a/pkgs/development/compilers/openjdk/19.nix b/pkgs/development/compilers/openjdk/19.nix index 190818e1fece..214831a3d569 100644 --- a/pkgs/development/compilers/openjdk/19.nix +++ b/pkgs/development/compilers/openjdk/19.nix @@ -80,6 +80,11 @@ let patchShebangs --build configure ''; + # JDK's build system attempts to specifically detect + # and special-case WSL, and we don't want it to do that, + # so pass the correct platform names explicitly + configurePlatforms = ["build" "host"]; + configureFlags = [ "--with-boot-jdk=${openjdk-bootstrap.home}" "--with-version-build=${version.build}"