Added JBoss

svn path=/nixpkgs/trunk/; revision=10259
This commit is contained in:
Sander van der Burg 2008-01-23 12:25:08 +00:00
parent d5b4e5606f
commit 12fafd0c7d
6 changed files with 81 additions and 0 deletions

View File

@ -1,3 +1,4 @@
buildInputs="$unzip"
source $stdenv/setup
src=$filename.bin

View File

@ -0,0 +1,9 @@
{stdenv, fetchurl, unzip}:
if stdenv.system == "i686-linux"
then
(import ./jdk5-sun-linux.nix) {
inherit stdenv fetchurl unzip;
}
else
abort "the Java 5 SDK is not supported on this platform"

View File

@ -0,0 +1,23 @@
/**
* This Nix expression requires the user to download the j2sdk
* distribution to /tmp. Please obtain jdk-1_5_0_14-linux-i586.bin
* from java.sun.com by hand and place it in /tmp. Blame Sun, not me.
*
* Note that this is not necessary if someone has already pushed a
* binary.
*/
{stdenv, fetchurl, unzip}:
assert stdenv.system == "i686-linux";
stdenv.mkDerivation {
name = "jdk-1.5.0_14";
filename = "jdk-1_5_0_14";
dirname = "jdk1.5.0_14";
builder = ./builder.sh;
pathname = "/tmp/jdk-1_5_0_14-linux-i586.bin";
md5 = "32df8f2be09c3a0f39da1b3869164b55";
stdenv = stdenv;
inherit unzip;
}

View File

@ -0,0 +1,18 @@
buildInputs="$jdk5"
source $stdenv/setup
export JDK_HOME=$jdk5
export JAVA_HOME=$jdk5
tar xfvz $src
cd jboss-*
cd build
sh build.sh
ensureDir $out
cp -av output/jboss-*/* $out
# Insert JAVA_HOME variable to make sure the latest JRE is used and not version 5
sed -i -e "/GREP/aJAVA_HOME=$jdk" $out/bin/run.sh
# Change the deploy directory to the nix profile
sed -i -e "s|deploy/|/nix/var/nix/profiles/default/server/default/deploy/|" $out/server/default/conf/jboss-service.xml

View File

@ -0,0 +1,20 @@
{ stdenv, fetchurl, jdk5, jdk }:
stdenv.mkDerivation {
name = "jboss-4.2.2.GA";
builder = ./builder.sh;
src =
fetchurl {
url = http://garr.dl.sourceforge.net/sourceforge/jboss/jboss-4.2.2.GA-src.tar.gz;
md5 = "2a626cdccabe712628555676d67ad44a";
};
inherit jdk5 jdk;
meta = {
homepage = "http://www.jboss.org/";
description = "JBoss, Open Source J2EE application server";
license = "GPL/LGPL";
};
}

View File

@ -1137,6 +1137,12 @@ rec {
inherit fetchurl stdenv;
};
jdk5 =
assert system == "i686-linux";
import ../development/compilers/jdk/default-5.nix {
inherit fetchurl stdenv unzip;
};
jdk = jdkdistro true false;
jre = jdkdistro false false;
@ -3010,6 +3016,10 @@ rec {
inherit fetchurl stdenv openssl zlib;
};
jboss = import ../servers/http/jboss {
inherit fetchurl stdenv jdk5 jdk;
};
jetty = import ../servers/http/jetty {
inherit fetchurl stdenv unzip;
};