Add IcedTea.

This is an old attempt at making it work.  Help welcome!

svn path=/nixpkgs/trunk/; revision=24360
This commit is contained in:
Ludovic Courtès 2010-10-19 08:19:46 +00:00
parent 346dbcdad3
commit ce292f38f9
3 changed files with 140 additions and 0 deletions

View file

@ -0,0 +1,112 @@
/* XXX: This is work in progress and it needs your help! */
/* See http://icedtea.classpath.org/wiki/BuildRequirements for a
list of dependencies. */
{ fetchurl, stdenv, which
, wget, cpio, file, ecj, gcj, ant, gawk, procps, inetutils, zip, unzip, zlib
, alsaLib, cups, lesstif, freetype, classpath, libjpeg, libpng, giflib
, xalanj, xerces, rhino
, libX11, libXp, libXtst, libXinerama, libXt, libXrender, xproto
, pkgconfig, xulrunner, pulseaudio }:
let
# These variables must match those in the top-level `Makefile.am'.
openjdkVersion = "b16";
openjdkDate = "24_apr_2009";
openjdkURL =
"http://download.java.net/openjdk/jdk6/promoted/${openjdkVersion}/";
openjdkSourceZip = "openjdk-6-src-${openjdkVersion}-${openjdkDate}.tar.gz";
openjdk = fetchurl {
url = "${openjdkURL}${openjdkSourceZip}";
sha256 = "084lkhsnj29finb6pmvrh83nqbliwv32gdi5q5sv43dpv24r85cn";
};
hotspot = fetchurl {
url = "http://hg.openjdk.java.net/hsx/hsx14/master/archive/09f7962b8b44.tar.gz";
sha256 = "1jbd9ki5ip96293mv1qil20yqcgvkmcrhs302j0n8i8f3v1j70bf";
};
in
stdenv.mkDerivation rec {
name = "icedtea6-1.6.1";
src = fetchurl {
url = "http://icedtea.classpath.org/download/source/${name}.tar.gz";
sha256 = "11vaanfmz842x576wrw5qldpkksi8wqjmh9wikn5gxyjk87qq3k5";
};
buildInputs = [
wget # Not actually used, thanks to `--with-openjdk-src-zip' et al.
which cpio file ecj gcj ant gawk procps inetutils zip unzip zlib
alsaLib cups lesstif freetype classpath libjpeg libpng giflib
xalanj xerces
libX11 libXp libXtst libXinerama libXt libXrender xproto
pkgconfig /* xulrunner */ pulseaudio
];
preConfigure =
'' # Use the Sun-compatible tools (`jar', etc.).
export PATH="${gcj.gcc}/lib/jvm/bin:$PATH"
# Copy patches.
cp -v "${./nixos-slash-bin.patch}" patches/nixos-slash-bin.patch
'';
configureFlags =
stdenv.lib.concatStringsSep " "
[ "--with-gcj-home=${gcj}"
"--with-ecj" "--with-ecj-jar=${ecj}/lib/java/ecj.jar"
"--with-openjdk-src-zip=${openjdk}"
"--with-hotspot-src-zip=${hotspot}"
"--with-ant-home=${ant}/lib/java"
"--with-xalan2-jar=${xalanj}/lib/java/xalan.jar"
"--with-xalan2-serializer-jar=${xalanj}/lib/java/xalan.jar"
"--with-xerces2-jar=${xerces}/lib/java/xercesImpl.jar"
"--with-rhino=${rhino}/lib/java/js.jar"
"--disable-plugin" # FIXME: Enable it someday.
"--with-parallel-job"
];
makeFlags =
[ # Have OpenCDK use tools from $PATH.
"ALT_UNIXCCS_PATH=" "ALT_UNIXCOMMAND_PATH=" "ALT_USRBIN_PATH="
"ALT_COMPILER_PATH=" "ALT_DEVTOOLS_PATH="
# Libraries.
"ALT_MOTIF_DIR="
"ALT_FREETYPE_HEADERS_PATH=${freetype}/include"
"ALT_FREETYPE_LIB_PATH=${freetype}/lib"
"ALT_CUPS_HEADERS_PATH=${cups}/include"
"ALT_CUPS_LIB_PATH=${cups}/lib"
# Tell IcedTea about our patches.
"DISTRIBUTION_PATCHES=patches/nixos-slash-bin.patch"
];
meta = {
description = "IcedTea, a libre Java development kit based on OpenJDK";
longDescription =
'' The IcedTea project provides a harness to build the source code from
http://openjdk.java.net using Free Software build tools and adds a
number of key features to the upstream OpenJDK codebase: a Free
64-bit plugin with LiveConnect and Java Web Start support, support
for additional platforms via a pure interpreted mode in HotSpot
(Zero) or the alternative CACAO virtual machine. Experimental JIT
support for Zero is also available via Shark.
'';
license = "GPLv2"; /* and multiple-licensing, e.g., for the plug-ins */
homepage = http://icedtea.classpath.org/;
maintainers = [ stdenv.lib.maintainers.ludo ];
# Restrict to GNU systems for now.
platforms = stdenv.lib.platforms.gnu;
};
}

View file

@ -0,0 +1,20 @@
Remove references to /bin/echo to allow NixOS builds.
--- openjdk/jdk/make/common/shared/Defs-utils.gmk 2009-04-24 09:33:55.000000000 +0200
+++ openjdk/jdk/make/common/shared/Defs-utils.gmk 2010-01-19 15:39:29.000000000 +0100
@@ -177,7 +177,7 @@ ifeq ($(PLATFORM),linux)
NAWK = $(USRBIN_PATH)gawk
# Intrinsic unix command, with backslash-escaped character interpretation
- ECHO = /bin/echo -e
+ ECHO = echo -e
# These are really in UTILS_USR_BIN_PATH on Linux (only sccs is not)
AR = $(UTILS_USR_BIN_PATH)ar
AS = $(UTILS_USR_BIN_PATH)as
@@ -195,6 +195,6 @@ ifeq ($(PLATFORM),solaris)
# Intrinsic unix command, with backslash-escaped character interpretation
# (not using -e will cause build failure when using /bin/bash)
# (using -e breaks something else)
- ECHO = /usr/bin/echo
+ ECHO = echo
endif

View file

@ -3084,6 +3084,14 @@ let
hydraAntLogger = callPackage ../development/libraries/java/hydra-ant-logger { }; hydraAntLogger = callPackage ../development/libraries/java/hydra-ant-logger { };
icedtea = callPackage ../development/libraries/java/icedtea {
ant = apacheAntGcj;
xerces = xercesJava;
xulrunner = icecatXulrunner3;
inherit (xlibs) libX11 libXp libXtst libXinerama libXt
libXrender xproto;
};
icu = callPackage ../development/libraries/icu { }; icu = callPackage ../development/libraries/icu { };
id3lib = callPackage ../development/libraries/id3lib { }; id3lib = callPackage ../development/libraries/id3lib { };