mirror of
https://github.com/NixOS/nixpkgs.git
synced 2025-04-14 06:27:43 +00:00
openjdk: passthru the architecture attribute like oracle jdk6 does.
This commit is contained in:
parent
dc4cfe89ff
commit
f4bc57feba
@ -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; };
|
||||
}
|
||||
|
||||
|
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user