openjdk: passthru the architecture attribute like oracle jdk6 does.
This commit is contained in:
@@ -21,6 +21,21 @@
|
|||||||
, jreOnly ? false
|
, 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 {
|
stdenv.mkDerivation rec {
|
||||||
name = "openj${if jreOnly then "re" else "dk"}-7b127";
|
name = "openj${if jreOnly then "re" else "dk"}-7b127";
|
||||||
|
|
||||||
@@ -137,5 +152,7 @@ stdenv.mkDerivation rec {
|
|||||||
|
|
||||||
platforms = stdenv.lib.platforms.linux;
|
platforms = stdenv.lib.platforms.linux;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
passthru = { inherit architecture; };
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
{ runCommand, openjdk, nukeReferences }:
|
{ 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" {} ''
|
runCommand "${openjdk.name}-bootstrap.tar.xz" {} ''
|
||||||
mkdir -p openjdk-bootstrap/bin
|
mkdir -p openjdk-bootstrap/bin
|
||||||
|
|||||||
Reference in New Issue
Block a user