diff --git a/pkgs/development/compilers/openjdk/default.nix b/pkgs/development/compilers/openjdk/default.nix index f7b000170a0c..cb4d8990258f 100644 --- a/pkgs/development/compilers/openjdk/default.nix +++ b/pkgs/development/compilers/openjdk/default.nix @@ -117,6 +117,9 @@ stdenv.mkDerivation rec { ensureDir $out cp -av build/*/j2${if jreOnly then "re" else "sdk"}-image/* $out '' + (if jreOnly then "" else '' + if [ -z $jre ]; then + exit 0 + fi ensureDir $jre cp -av build/*/j2re-image/* $jre '');