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 | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/pkgs/development/compilers/adoptopenjdk-bin/jdk-darwin-base.nix b/pkgs/development/compilers/adoptopenjdk-bin/jdk-darwin-base.nix index 9479e15cd6f..ef3e4b7219e 100644 --- a/pkgs/development/compilers/adoptopenjdk-bin/jdk-darwin-base.nix +++ b/pkgs/development/compilers/adoptopenjdk-bin/jdk-darwin-base.nix @@ -1,10 +1,13 @@ -sourcePerArch: +{ sourcePerArch, knownVulnerabilities ? [] }: { swingSupport ? true # not used for now , lib, stdenv , fetchurl +, setJavaClassPath }: +assert (stdenv.isDarwin && stdenv.isx86_64); + let cpuName = stdenv.hostPlatform.parsed.cpu.name; result = stdenv.mkDerivation { name = if sourcePerArch.packageType == "jdk" @@ -33,7 +36,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 @@ -51,6 +58,8 @@ let cpuName = stdenv.hostPlatform.parsed.cpu.name; description = "AdoptOpenJDK, prebuilt OpenJDK binary"; platforms = [ "x86_64-darwin" ]; # some inherit jre.meta.platforms maintainers = with lib.maintainers; [ taku0 ]; + inherit knownVulnerabilities; + mainProgram = "java"; }; }; in result |