Fixed setup.sh - non-default Makefile may be passed in makeFlags. OpenFire added, doesn't work yet

svn path=/nixpkgs/branches/stdenv-updates/; revision=10795
This commit is contained in:
Michael Raskin 2008-02-21 04:48:55 +00:00
parent b67cb39b7d
commit ed3cf0a497
4 changed files with 37 additions and 2 deletions

View File

@ -8,7 +8,7 @@ stdenv.mkDerivation {
sha256 = "0azvl43niqkq94drx52p6dvp70r38f25fqw181ywmvqn80dbb3c9"; sha256 = "0azvl43niqkq94drx52p6dvp70r38f25fqw181ywmvqn80dbb3c9";
}; };
unpackPhase = "tar xvjf $src; cd lsof_*; tar xvf lsof_*.tar; sourceRoot=lsof_*; "; unpackPhase = "tar xvjf $src; cd lsof_*; tar xvf lsof_*.tar; sourceRoot=$( echo lsof_*); ";
preBuild = "sed -i Makefile -e 's/^CFGF=/& -DHASIPv6=1/;';"; preBuild = "sed -i Makefile -e 's/^CFGF=/& -DHASIPv6=1/;';";
configurePhase = "./Configure -n linux;"; configurePhase = "./Configure -n linux;";
installPhase = " mkdir -p $out/bin $out/man/man8; cp lsof.8 $out/man/man8/; cp lsof $out/bin"; installPhase = " mkdir -p $out/bin $out/man/man8; cp lsof.8 $out/man/man8/; cp lsof $out/bin";

View File

@ -0,0 +1,29 @@
args : with args; with builderDefs {src="";} null;
let localDefs = builderDefs (rec {
src = /* put a fetchurl here */
fetchurl {
url = http://www.igniterealtime.org/downloadServlet?filename=openfire/openfire_3_4_5.tar.gz;
sha256 = "0j1ddk0wiqxhbi3872vf2mqx0jynswrvbfbabrp73zqhz3mdvsal";
};
buildInputs = [jre];
configureFlags = [];
installPhase = FullDepEntry (''
sed -e 's@\(common_jvm_locations\)=.*@\1${jre}@' -i bin/openfire
cp -r . $out
'')
["minInit" "doUnpack" "findInputs"];
}) null; /* null is a terminator for sumArgs */
in with localDefs;
stdenv.mkDerivation rec {
name = "openfire-"+version;
builder = writeScript (name + "-builder")
(textClosure localDefs
[ doForceShare doPropagate installPhase]);
meta = {
description = "
XMPP server in Java.
";
};
}

View File

@ -615,7 +615,7 @@ buildPhase() {
eval "$preBuild" eval "$preBuild"
if ! test -n "$makefile" -o -e "Makefile" -o -e "makefile" -o -e "GNUmakefile"; then if test -z "$makeFlags" ! test -n "$makefile" -o -e "Makefile" -o -e "makefile" -o -e "GNUmakefile"; then
echo "no Makefile, doing nothing" echo "no Makefile, doing nothing"
return return
fi fi

View File

@ -3257,6 +3257,12 @@ rec {
inherit fetchurl stdenv openssh; inherit fetchurl stdenv openssh;
}; };
openfireFun = lib.sumArgs (selectVersion ../servers/xmpp/openfire "3.4.5") {
inherit builderDefs jre;
};
openfire = openfireFun null;
postgresql = selectVersion ../servers/sql/postgresql "8.3.0" { postgresql = selectVersion ../servers/sql/postgresql "8.3.0" {
inherit fetchurl stdenv readline ncurses zlib; inherit fetchurl stdenv readline ncurses zlib;
}; };