From d86846bb6ae3e5a8107531f64b53d2d7294d0334 Mon Sep 17 00:00:00 2001 From: Martin Bravenboer Date: Sun, 18 Mar 2007 00:33:32 +0000 Subject: [PATCH] Fixes in x86_64 support for the jdk. svn path=/nixpkgs/trunk/; revision=8329 --- .../development/compilers/jdk/dlj-bundle-builder.sh | 4 ++-- pkgs/development/compilers/jdk/jdk6-linux.nix | 13 ++++++++++++- 2 files changed, 14 insertions(+), 3 deletions(-) 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 {}