diff --git a/pkgs/development/compilers/jdk/dlj-bundle-builder.sh b/pkgs/development/compilers/jdk/dlj-bundle-builder.sh index c08a5237f51..ee58ce9127c 100644 --- a/pkgs/development/compilers/jdk/dlj-bundle-builder.sh +++ b/pkgs/development/compilers/jdk/dlj-bundle-builder.sh @@ -50,5 +50,8 @@ if test -z "$pluginSupport"; then rm -f $out/bin/javaws fi +mkdir $jrePath/lib/$architecture/plugins +ln -s $jrePath/lib/$architecture/libnpjp2.so $jrePath/lib/$architecture/plugins + # Workaround for assertions in xlib, see http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=6532373. substituteInPlace $jrePath/lib/*/xawt/libmawt.so --replace XINERAMA FAKEEXTN diff --git a/pkgs/development/compilers/jdk/jdk6-linux.nix b/pkgs/development/compilers/jdk/jdk6-linux.nix index e61affa5e86..8a11e85ed98 100644 --- a/pkgs/development/compilers/jdk/jdk6-linux.nix +++ b/pkgs/development/compilers/jdk/jdk6-linux.nix @@ -11,7 +11,22 @@ assert stdenv.system == "i686-linux" || stdenv.system == "x86_64-linux"; assert swingSupport -> xlibs != null; -stdenv.mkDerivation ({ +let + + /** + * 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"; + +in + +stdenv.mkDerivation { name = if installjdk then "jdk-1.6.0_20" else "jre-1.6.0_20"; @@ -39,17 +54,6 @@ stdenv.mkDerivation ({ 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 makeWrapper]; /** @@ -59,22 +63,8 @@ stdenv.mkDerivation ({ [stdenv.gcc.libc] ++ (if swingSupport then [xlibs.libX11 xlibs.libXext xlibs.libXtst xlibs.libXi xlibs.libXp xlibs.libXt] else []); - inherit swingSupport pluginSupport; + inherit swingSupport pluginSupport architecture; inherit (xlibs) libX11; -} // - /** - * comment: there is a plugin for amd64 since 0_13. However it's located in - * JRE_STORE_PATH/lib/amd64/libnpjp2.so. I don't know yet how to add it to - * MOZ_PLUGIN_PATH so that it's found. Put a symlink into ~/.mozilla/plugins - * instead. - */ - ( if stdenv.system == "i686-linux" then - { - mozillaPlugin = - if installjdk then "/jre/lib/i386" else "/lib/i386"; - } - else - {} - ) -) + mozillaPlugin = if installjdk then "/jre/lib/${architecture}/plugins" else "/lib/${architecture}/plugins"; +}