about summary refs log tree commit diff
diff options
context:
space:
mode:
authorMartin Bravenboer <martin.bravenboer@logicblox.com>2007-03-17 14:37:23 +0000
committerMartin Bravenboer <martin.bravenboer@logicblox.com>2007-03-17 14:37:23 +0000
commit03dbe4cf1fc62a4bb6271d9214fc72940f0fa0b5 (patch)
tree2b603012d691c3428ef3eedd9001f6bb0ae99051
parentcf3571e85cd5e83c67dd2d64cf4e1bd6ae9ab123 (diff)
downloadnixlib-03dbe4cf1fc62a4bb6271d9214fc72940f0fa0b5.tar
nixlib-03dbe4cf1fc62a4bb6271d9214fc72940f0fa0b5.tar.gz
nixlib-03dbe4cf1fc62a4bb6271d9214fc72940f0fa0b5.tar.bz2
nixlib-03dbe4cf1fc62a4bb6271d9214fc72940f0fa0b5.tar.lz
nixlib-03dbe4cf1fc62a4bb6271d9214fc72940f0fa0b5.tar.xz
nixlib-03dbe4cf1fc62a4bb6271d9214fc72940f0fa0b5.tar.zst
nixlib-03dbe4cf1fc62a4bb6271d9214fc72940f0fa0b5.zip
Added x86_64-linux support to the jdk.
svn path=/nixpkgs/trunk/; revision=8326
-rw-r--r--pkgs/development/compilers/jdk/default.nix2
-rw-r--r--pkgs/development/compilers/jdk/jdk6-linux.nix42
2 files changed, 30 insertions, 14 deletions
diff --git a/pkgs/development/compilers/jdk/default.nix b/pkgs/development/compilers/jdk/default.nix
index 9801b3f0e12c..fd5aea133d66 100644
--- a/pkgs/development/compilers/jdk/default.nix
+++ b/pkgs/development/compilers/jdk/default.nix
@@ -1,6 +1,6 @@
 args:
 
-if args.stdenv.system == "i686-linux"  then
+if args.stdenv.system == "i686-linux" || args.stdenv.system == "x86_64-linux" then
   (import ./jdk6-linux.nix) args
 
 else if args.stdenv.system == "powerpc-linux"  then
diff --git a/pkgs/development/compilers/jdk/jdk6-linux.nix b/pkgs/development/compilers/jdk/jdk6-linux.nix
index df8eedcf11bc..9020705396d6 100644
--- a/pkgs/development/compilers/jdk/jdk6-linux.nix
+++ b/pkgs/development/compilers/jdk/jdk6-linux.nix
@@ -6,10 +6,7 @@
 , installjdk ? true
 }:
 
-/**
- * @todo Support x86_64-linux.
- */
-assert stdenv.system == "i686-linux";
+assert stdenv.system == "i686-linux" || stdenv.system == "x86_64-linux";
 assert swingSupport -> xlibs != null;
 
 (stdenv.mkDerivation {
@@ -17,10 +14,18 @@ assert swingSupport -> xlibs != null;
     if installjdk then "jdk-1.6.0" else "jre-1.6.0";
 
   src =
-    fetchurl {
-      url = http://download.java.net/dlj/binaries/jdk-6-dlj-linux-i586.bin;
-      sha256 = "0rw48124fdc5rhafj6qzrysb4w823jbn3awxgn07kcy1nvnrhkqw";
-    };
+    if stdenv.system == "i686-linux" then
+      fetchurl {
+        url = http://download.java.net/dlj/binaries/jdk-6-dlj-linux-i586.bin;
+        sha256 = "0rw48124fdc5rhafj6qzrysb4w823jbn3awxgn07kcy1nvnrhkqw";
+      }
+    else if stdenv.system == "x86_64-linux" then
+      fetchurl {
+        url = http://download.java.net/dlj/binaries/jdk-6-dlj-linux-amd64.bin;
+        sha256 = "1hr16f5kr3xcyhkl3yc2qi2kxg2avr3cmlxv4awpnj0930rmvwzi";
+      }
+    else
+      abort "jdk requires i686-linux or x86_64 linux";
 
   builder = ./dlj-bundle-builder.sh;
 
@@ -35,10 +40,21 @@ assert swingSupport -> xlibs != null;
   buildInputs = [unzip];
   libraries =
     (if swingSupport then [xlibs.libX11 xlibs.libXext xlibs.libXtst xlibs.libXi] else []);
-} // {
-  inherit swingSupport;
-} // {
-  mozillaPlugin =
-     if installjdk then "jre/plugin/i386/ns7" else "/plugin/i386/ns7";
+}
+//
+  {
+    inherit swingSupport;
   }
+// 
+  /**
+   * The mozilla plugin is not available in the amd64 distribution (?)
+   */
+  ( if stdenv.system == "i686-linux" then
+      {
+        mozillaPlugin =
+         if installjdk then "jre/plugin/i386/ns7" else "/plugin/i386/ns7";
+      }
+    else
+      {}
+  )
 )
\ No newline at end of file