Author: viric Date: Tue Sep 14 15:14:18 2010 New Revision: 23801 URL: https://svn.nixos.org/websvn/nix/?rev=23801&sc=1
Log: Making the firefox java plugin work in i686-linux and x86_64-linux. It should work for both firefox 3.6 and firefox 3.5 (said roconnor on irc). Thanks to the wiki page http://wiki.nixos.org/wiki/Java_in_Firefox which explained why what we had did not work. Modified: nixpkgs/trunk/pkgs/development/compilers/jdk/dlj-bundle-builder.sh nixpkgs/trunk/pkgs/development/compilers/jdk/jdk6-linux.nix Modified: nixpkgs/trunk/pkgs/development/compilers/jdk/dlj-bundle-builder.sh ============================================================================== --- nixpkgs/trunk/pkgs/development/compilers/jdk/dlj-bundle-builder.sh Tue Sep 14 14:47:16 2010 (r23800) +++ nixpkgs/trunk/pkgs/development/compilers/jdk/dlj-bundle-builder.sh Tue Sep 14 15:14:18 2010 (r23801) @@ -50,5 +50,8 @@ 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 Modified: nixpkgs/trunk/pkgs/development/compilers/jdk/jdk6-linux.nix ============================================================================== --- nixpkgs/trunk/pkgs/development/compilers/jdk/jdk6-linux.nix Tue Sep 14 14:47:16 2010 (r23800) +++ nixpkgs/trunk/pkgs/development/compilers/jdk/jdk6-linux.nix Tue Sep 14 15:14:18 2010 (r23801) @@ -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 @@ 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.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"; +} _______________________________________________ nix-commits mailing list [email protected] http://mail.cs.uu.nl/mailman/listinfo/nix-commits
