mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-02 15:41:48 +00:00
inital try with jdk6 on cygwin
svn path=/nixpkgs/trunk/; revision=22000
This commit is contained in:
parent
caf8fe39cf
commit
41aa02a8b4
@ -1,9 +1,11 @@
|
||||
args:
|
||||
|
||||
if args.stdenv.system == "i686-linux" || args.stdenv.system == "x86_64-linux" then
|
||||
(import ./jdk6-linux.nix) args
|
||||
(import ./jdk6-linux.nix) ( removeAttrs args ["cabextract"] )
|
||||
else if args.stdenv.system == "powerpc-linux" then
|
||||
(import ./jdk5-ibm-powerpc-linux.nix) (removeAttrs args ["pluginSupport" "xlibs" "installjdk"])
|
||||
(import ./jdk5-ibm-powerpc-linux.nix) (removeAttrs args ["pluginSupport" "xlibs" "installjdk" "cabextract"])
|
||||
else if args.stdenv.system == "i686-cygwin" then
|
||||
(import ./jdk6-cygwin.nix) (removeAttrs args ["pluginSupport" "xlibs" "installjdk" "xlibs"])
|
||||
else
|
||||
abort "the JDK is not supported on this platform"
|
||||
|
||||
|
46
pkgs/development/compilers/jdk/jdk6-cygwin.nix
Normal file
46
pkgs/development/compilers/jdk/jdk6-cygwin.nix
Normal file
@ -0,0 +1,46 @@
|
||||
{ stdenv
|
||||
, fetchurl
|
||||
, unzip
|
||||
, cabextract
|
||||
, ...
|
||||
}:
|
||||
|
||||
assert stdenv.system == "i686-cygwin";
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
name = "jdk-1.6.0_20";
|
||||
|
||||
src = fetchurl {
|
||||
url = file:///tmp/jdk-6u20-windows-i586.exe ;
|
||||
sha256 = "0w4afz8a9gi1iyhh47gvhiy59dfrzx0fnmywdff3v5cx696w25fh";
|
||||
};
|
||||
|
||||
buildInputs = [unzip cabextract];
|
||||
|
||||
buildCommand = ''
|
||||
cabextract ${src}
|
||||
mkdir -p $out
|
||||
unzip -d $out tools.zip
|
||||
find $out -name '*.exe' | xargs chmod a+x
|
||||
find $out -name '*.dll' | xargs chmod a+x
|
||||
|
||||
cd $out
|
||||
$out/bin/unpack200.exe ./jre/lib/jsse.pack ./jre/lib/jsse.jar
|
||||
$out/bin/unpack200.exe ./jre/lib/javaws.pack ./jre/lib/javaws.jar
|
||||
$out/bin/unpack200.exe ./jre/lib/plugin.pack ./jre/lib/plugin.jar
|
||||
$out/bin/unpack200.exe ./jre/lib/charsets.pack ./jre/lib/charsets.jar
|
||||
$out/bin/unpack200.exe ./jre/lib/deploy.pack ./jre/lib/deploy.jar
|
||||
$out/bin/unpack200.exe ./jre/lib/rt.pack ./jre/lib/rt.jar
|
||||
$out/bin/unpack200.exe ./jre/lib/ext/localedata.pack ./jre/lib/ext/localedata.jar
|
||||
$out/bin/unpack200.exe ./lib/tools.pack ./lib/tools.jar
|
||||
|
||||
rm ./jre/lib/jsse.pack \
|
||||
./jre/lib/javaws.pack \
|
||||
./jre/lib/plugin.pack \
|
||||
./jre/lib/charsets.pack \
|
||||
./jre/lib/deploy.pack \
|
||||
./jre/lib/rt.pack \
|
||||
./jre/lib/ext/localedata.pack \
|
||||
./lib/tools.pack
|
||||
'';
|
||||
}
|
@ -2467,12 +2467,13 @@ let
|
||||
supportsJDK =
|
||||
system == "i686-linux" ||
|
||||
system == "x86_64-linux" ||
|
||||
system == "i686-cygwin" ||
|
||||
system == "powerpc-linux";
|
||||
|
||||
jdkdistro = installjdk: pluginSupport:
|
||||
(assert supportsJDK;
|
||||
(if pluginSupport then appendToName "plugin" else x: x) (import ../development/compilers/jdk {
|
||||
inherit fetchurl stdenv unzip installjdk xlibs pluginSupport makeWrapper;
|
||||
inherit fetchurl stdenv unzip installjdk xlibs pluginSupport makeWrapper cabextract;
|
||||
}));
|
||||
|
||||
jikes = import ../development/compilers/jikes {
|
||||
|
Loading…
Reference in New Issue
Block a user