diff --git a/pkgs/development/compilers/jdk/dlj-bundle-builder.sh b/pkgs/development/compilers/jdk/dlj-bundle-builder.sh index 0b43c0f4419a..4b9d0d482625 100644 --- a/pkgs/development/compilers/jdk/dlj-bundle-builder.sh +++ b/pkgs/development/compilers/jdk/dlj-bundle-builder.sh @@ -32,9 +32,9 @@ for i in $libraries; do done if test -z "$installjdk"; then - rpath=$rpath${rpath:+:}$out/lib/i386/jli + rpath=$rpath${rpath:+:}$out/lib/$architecture/jli else - rpath=$rpath${rpath:+:}$out/jre/lib/i386/jli + rpath=$rpath${rpath:+:}$out/jre/lib/$architecture/jli fi # set all the dynamic linkers diff --git a/pkgs/development/compilers/jdk/jdk6-linux.nix b/pkgs/development/compilers/jdk/jdk6-linux.nix index 9020705396d6..96647e2ac98c 100644 --- a/pkgs/development/compilers/jdk/jdk6-linux.nix +++ b/pkgs/development/compilers/jdk/jdk6-linux.nix @@ -37,6 +37,17 @@ assert swingSupport -> xlibs != null; construct = ./jdk6-construct.sh; inherit installjdk; + /** + * The JRE libraries are in directories that depend on the CPU. + */ + architecture = + if stdenv.system == "i686-linux" then + "i386" + else if stdenv.system == "x86_64-linux" then + "amd64" + else + abort "jdk requires i686-linux or x86_64 linux"; + buildInputs = [unzip]; libraries = (if swingSupport then [xlibs.libX11 xlibs.libXext xlibs.libXtst xlibs.libXi] else []); @@ -52,7 +63,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 {}