summary refs log tree commit diff
path: root/pkgs/development/compilers/jdk
diff options
context:
space:
mode:
authorEelco Dolstra <eelco.dolstra@logicblox.com>2008-02-26 15:24:33 +0000
committerEelco Dolstra <eelco.dolstra@logicblox.com>2008-02-26 15:24:33 +0000
commit65dcf5ffa444fbed986abf759114cf6537008917 (patch)
tree52d2cb3c1b7959c0e77a27088f26cb8a59290072 /pkgs/development/compilers/jdk
parent2763f4d08c01a6cbd6d262a52c1a73d9c9fda279 (diff)
downloadnixpkgs-65dcf5ffa444fbed986abf759114cf6537008917.tar
nixpkgs-65dcf5ffa444fbed986abf759114cf6537008917.tar.gz
nixpkgs-65dcf5ffa444fbed986abf759114cf6537008917.tar.bz2
nixpkgs-65dcf5ffa444fbed986abf759114cf6537008917.tar.lz
nixpkgs-65dcf5ffa444fbed986abf759114cf6537008917.tar.xz
nixpkgs-65dcf5ffa444fbed986abf759114cf6537008917.tar.zst
nixpkgs-65dcf5ffa444fbed986abf759114cf6537008917.zip
* Fix jre, and some cleanups.
svn path=/nixpkgs/trunk/; revision=10863
Diffstat (limited to 'pkgs/development/compilers/jdk')
-rw-r--r--pkgs/development/compilers/jdk/dlj-bundle-builder.sh16
-rw-r--r--pkgs/development/compilers/jdk/jdk6-linux.nix4
2 files changed, 9 insertions, 11 deletions
diff --git a/pkgs/development/compilers/jdk/dlj-bundle-builder.sh b/pkgs/development/compilers/jdk/dlj-bundle-builder.sh
index 74772222b19..5a3c8bf7f2e 100644
--- a/pkgs/development/compilers/jdk/dlj-bundle-builder.sh
+++ b/pkgs/development/compilers/jdk/dlj-bundle-builder.sh
@@ -32,11 +32,13 @@ for i in $libraries; do
 done
 
 if test -z "$installjdk"; then
-  rpath=$rpath${rpath:+:}$out/lib/$architecture/jli
+  jrePath=$out
 else
-  rpath=$rpath${rpath:+:}$out/jre/lib/$architecture/jli
+  jrePath=$out/jre
 fi
 
+rpath=$rpath${rpath:+:}$jrePath/lib/$architecture/jli
+
 # set all the dynamic linkers
 find $out -type f -perm +100 \
     -exec patchelf --interpreter "$(cat $NIX_GCC/nix-support/dynamic-linker)" \
@@ -52,15 +54,11 @@ function mozillaExtraLibPath() {
 if test -z "$pluginSupport"; then
   rm $out/bin/javaws
 else
-  source $makeWrapper
-
-  mv $out/bin/javaws $out/bin/javaws.bin
-  makeWrapper "$out/bin/javaws.bin" "$out/bin/javaws" \
+  wrapProgram "$out/bin/javaws" \
     --suffix-each LD_LIBRARY_PATH ':' "$(addSuffix /lib $libPath)"
 
-  mozillaExtraLibPath "$out/jre/plugin/i386/ns7"
-  mozillaExtraLibPath "$out/plugin/i386/ns7"
+  mozillaExtraLibPath "$jrePath/plugin/i386/ns7"
 fi
 
 # Workaround for assertions in xlib, see http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=6532373.
-substituteInPlace $out/jre/lib/i386/xawt/libmawt.so --replace XINERAMA FAKEEXTN
+substituteInPlace $jrePath/lib/i386/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 0c285c4526e..14e0005e38c 100644
--- a/pkgs/development/compilers/jdk/jdk6-linux.nix
+++ b/pkgs/development/compilers/jdk/jdk6-linux.nix
@@ -2,6 +2,7 @@
 , stdenv
 , fetchurl
 , unzip
+, makeWrapper
 , xlibs ? null
 , installjdk ? true
 , pluginSupport ? true
@@ -51,7 +52,7 @@ assert pluginSupport -> libstdcpp5 != null;
     else
       abort "jdk requires i686-linux or x86_64 linux";
 
-  buildInputs = [unzip];
+  buildInputs = [unzip makeWrapper];
   libraries =
     (if swingSupport then [xlibs.libX11 xlibs.libXext xlibs.libXtst xlibs.libXi] else []);
 
@@ -60,7 +61,6 @@ assert pluginSupport -> libstdcpp5 != null;
   # necessary for javaws and mozilla plugin
   if pluginSupport then
     {
-      makeWrapper = ../../../build-support/make-wrapper/make-wrapper.sh;
       libPath = [libstdcpp5];
       inherit libstdcpp5;
     }