diff options
Diffstat (limited to 'pkgs/development/compilers/adoptopenjdk-bin/jdk-linux-base.nix')
-rw-r--r-- | pkgs/development/compilers/adoptopenjdk-bin/jdk-linux-base.nix | 13 |
1 files changed, 10 insertions, 3 deletions
diff --git a/pkgs/development/compilers/adoptopenjdk-bin/jdk-linux-base.nix b/pkgs/development/compilers/adoptopenjdk-bin/jdk-linux-base.nix index 44126a54d5b..39685131edd 100644 --- a/pkgs/development/compilers/adoptopenjdk-bin/jdk-linux-base.nix +++ b/pkgs/development/compilers/adoptopenjdk-bin/jdk-linux-base.nix @@ -1,12 +1,13 @@ -sourcePerArch: +{ sourcePerArch, knownVulnerabilities ? [] }: { stdenv , lib , fetchurl , autoPatchelfHook , makeWrapper +, setJavaClassPath # minimum dependencies -, alsaLib +, alsa-lib , fontconfig , freetype , libffi @@ -43,7 +44,7 @@ let result = stdenv.mkDerivation rec { }; buildInputs = [ - alsaLib # libasound.so wanted by lib/libjsound.so + alsa-lib # libasound.so wanted by lib/libjsound.so fontconfig freetype stdenv.cc.cc.lib # libstdc++.so.6 @@ -77,7 +78,11 @@ let result = stdenv.mkDerivation rec { # https://github.com/NixOS/nixpkgs/issues/57733 find "$out" -name 'libfreetype.so*' -delete + # 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" @@ -110,6 +115,8 @@ let result = stdenv.mkDerivation rec { description = "AdoptOpenJDK, prebuilt OpenJDK binary"; platforms = lib.mapAttrsToList (arch: _: arch + "-linux") sourcePerArch; # some inherit jre.meta.platforms maintainers = with lib.maintainers; [ taku0 ]; + inherit knownVulnerabilities; + mainProgram = "java"; }; }; in result |