diff options
Diffstat (limited to 'pkgs/development/compilers/adoptopenjdk-bin/jdk-darwin-base.nix')
| -rw-r--r-- | pkgs/development/compilers/adoptopenjdk-bin/jdk-darwin-base.nix | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/pkgs/development/compilers/adoptopenjdk-bin/jdk-darwin-base.nix b/pkgs/development/compilers/adoptopenjdk-bin/jdk-darwin-base.nix index 0bcfcafaae1b..71a55c68290c 100644 --- a/pkgs/development/compilers/adoptopenjdk-bin/jdk-darwin-base.nix +++ b/pkgs/development/compilers/adoptopenjdk-bin/jdk-darwin-base.nix @@ -3,6 +3,7 @@ { swingSupport ? true # not used for now , lib, stdenv , fetchurl +, setJavaClassPath }: let cpuName = stdenv.hostPlatform.parsed.cpu.name; @@ -30,7 +31,11 @@ let cpuName = stdenv.hostPlatform.parsed.cpu.name; ln -s $out/Contents/Home/* $out/ + # Propagate the setJavaClassPath setup hook from the JDK so that + # any package that depends on the JDK has $CLASSPATH set up + # properly. mkdir -p $out/nix-support + printWords ${setJavaClassPath} > $out/nix-support/propagated-build-inputs # Set JAVA_HOME automatically. cat <<EOF >> $out/nix-support/setup-hook @@ -49,6 +54,7 @@ let cpuName = stdenv.hostPlatform.parsed.cpu.name; platforms = [ "x86_64-darwin" ]; # some inherit jre.meta.platforms maintainers = with lib.maintainers; [ taku0 ]; inherit knownVulnerabilities; + mainProgram = "java"; }; }; in result |
