diff --git a/pkgs/development/compilers/jdk/dlj-bundle-builder.sh b/pkgs/development/compilers/jdk/dlj-bundle-builder.sh index 4b9d0d482625..ea2ccbd92f3a 100644 --- a/pkgs/development/compilers/jdk/dlj-bundle-builder.sh +++ b/pkgs/development/compilers/jdk/dlj-bundle-builder.sh @@ -1,4 +1,5 @@ source $stdenv/setup +source $makeWrapper echo "Unpacking distribution" unzip ${src} || true @@ -41,3 +42,19 @@ fi find $out -type f -perm +100 \ -exec patchelf --interpreter "$(cat $NIX_GCC/nix-support/dynamic-linker)" \ --set-rpath "$rpath" {} \; + +mv $out/bin/javaws $out/bin/javaws.bin +makeWrapper "$out/bin/javaws.bin" "$out/bin/javaws" \ + --suffix-each LD_LIBRARY_PATH ':' "$(addSuffix /lib $libPath)" + + +function mozillaExtraLibPath() { + p=$1 + + if test -e "$p"; then + echo "$libstdcpp5/lib" > $p/extra-library-path + fi +} + +mozillaExtraLibPath "$out/jre/plugin/i386/ns7" +mozillaExtraLibPath "$out/plugin/i386/ns7" diff --git a/pkgs/development/compilers/jdk/jdk6-linux.nix b/pkgs/development/compilers/jdk/jdk6-linux.nix index c3c30350dd95..4d9a625b7c72 100644 --- a/pkgs/development/compilers/jdk/jdk6-linux.nix +++ b/pkgs/development/compilers/jdk/jdk6-linux.nix @@ -4,6 +4,7 @@ , unzip , xlibs ? null , installjdk ? true +, libstdcpp5 }: assert stdenv.system == "i686-linux" || stdenv.system == "x86_64-linux"; @@ -51,6 +52,11 @@ assert swingSupport -> xlibs != null; buildInputs = [unzip]; libraries = (if swingSupport then [xlibs.libX11 xlibs.libXext xlibs.libXtst xlibs.libXi] else []); + + # necessary for javaws and mozilla plugin + makeWrapper = ../../../build-support/make-wrapper/make-wrapper.sh; + libPath = [libstdcpp5]; + inherit libstdcpp5; } // { @@ -63,7 +69,7 @@ assert swingSupport -> xlibs != null; ( if stdenv.system == "i686-linux" then { mozillaPlugin = - if installjdk then "jre/plugin/i386/ns7" else "plugin/i386/ns7"; + if installjdk then "/jre/plugin/i386/ns7" else "/plugin/i386/ns7"; } else {} diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 4833f72f0da0..77dee779269a 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -757,6 +757,7 @@ rec { else import ../development/compilers/jdk { inherit fetchurl stdenv unzip installjdk xlibs; + libstdcpp5 = gcc33.gcc; }; jikes = import ../development/compilers/jikes { @@ -2448,7 +2449,7 @@ rec { userModeLinux = true; }; - umlutilities = import ../os-specific/uml-utilities { + umlutilities = import ../os-specific/linux/uml-utilities { inherit fetchurl stdenv; };