3
0
Fork 0
forked from mirrors/nixpkgs

openjdk: passthru the architecture attribute like oracle jdk6 does.

This commit is contained in:
Shea Levy 2012-08-27 12:41:13 -04:00
parent dc4cfe89ff
commit f4bc57feba
2 changed files with 18 additions and 1 deletions

View file

@ -21,6 +21,21 @@
, jreOnly ? false
}:
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
throw "openjdk requires i686-linux or x86_64 linux";
in
stdenv.mkDerivation rec {
name = "openj${if jreOnly then "re" else "dk"}-7b127";
@ -137,5 +152,7 @@ stdenv.mkDerivation rec {
platforms = stdenv.lib.platforms.linux;
};
passthru = { inherit architecture; };
}

View file

@ -1,6 +1,6 @@
{ runCommand, openjdk, nukeReferences }:
let arch = if openjdk.system == "x86_64-linux" then "amd64" else "i386"; in
let arch = openjdk.architecture; in
runCommand "${openjdk.name}-bootstrap.tar.xz" {} ''
mkdir -p openjdk-bootstrap/bin