2010-11-01 18:33:24 +01:00
|
|
|
{ stdenv, fetchurl
|
2010-12-22 14:31:25 +01:00
|
|
|
, ejabberd ? null, mysql ? null, postgresql ? null, subversion ? null
|
2010-11-01 18:33:24 +01:00
|
|
|
, enableApacheWebApplication ? false
|
|
|
|
, enableAxis2WebService ? false
|
|
|
|
, enableEjabberdDump ? false
|
|
|
|
, enableMySQLDatabase ? false
|
2010-12-22 14:31:25 +01:00
|
|
|
, enablePostgreSQLDatabase ? false
|
|
|
|
, enableSubversionRepository ? false
|
2010-11-01 18:33:24 +01:00
|
|
|
, enableTomcatWebApplication ? false
|
|
|
|
, catalinaBaseDir ? "/var/tomcat"
|
|
|
|
}:
|
|
|
|
|
|
|
|
assert enableMySQLDatabase -> mysql != null;
|
2010-12-22 14:31:25 +01:00
|
|
|
assert enablePostgreSQLDatabase -> postgresql != null;
|
|
|
|
assert enableSubversionRepository -> subversion != null;
|
2010-11-01 18:33:24 +01:00
|
|
|
assert enableEjabberdDump -> ejabberd != null;
|
2009-09-02 12:03:45 +02:00
|
|
|
|
|
|
|
stdenv.mkDerivation {
|
2011-10-19 14:24:24 +02:00
|
|
|
name = "disnix-activation-scripts-0.3pre29887";
|
2010-04-01 16:49:05 +02:00
|
|
|
src = fetchurl {
|
2011-10-19 14:24:24 +02:00
|
|
|
url = http://hydra.nixos.org/build/1461490/download/1/disnix-activation-scripts-0.3pre29887.tar.gz;
|
|
|
|
sha256 = "034mx096iz9dqjsrxh6jkvcwch399gfsahrm6vfnswz9jfvfdcw0";
|
2009-09-02 12:03:45 +02:00
|
|
|
};
|
2010-11-01 18:33:24 +01:00
|
|
|
|
|
|
|
preConfigure = if enableEjabberdDump then "export PATH=$PATH:${ejabberd}/sbin" else "";
|
|
|
|
|
|
|
|
configureFlags = ''
|
|
|
|
${if enableApacheWebApplication then "--with-apache" else "--without-apache"}
|
|
|
|
${if enableAxis2WebService then "--with-axis2" else "--without-axis2"}
|
|
|
|
${if enableEjabberdDump then "--with-ejabberd" else "--without-ejabberd"}
|
|
|
|
${if enableMySQLDatabase then "--with-mysql" else "--without-mysql"}
|
2010-12-22 14:31:25 +01:00
|
|
|
${if enablePostgreSQLDatabase then "--with-postgresql" else "--without-postgresql"}
|
|
|
|
${if enableSubversionRepository then "--with-subversion" else "--without-subversion"}
|
2010-11-01 18:33:24 +01:00
|
|
|
${if enableTomcatWebApplication then "--with-tomcat=${catalinaBaseDir}" else "--without-tomcat"}
|
|
|
|
'';
|
|
|
|
|
|
|
|
buildInputs = []
|
|
|
|
++ stdenv.lib.optional enableEjabberdDump ejabberd
|
2010-12-22 14:31:25 +01:00
|
|
|
++ stdenv.lib.optional enableMySQLDatabase mysql
|
|
|
|
++ stdenv.lib.optional enablePostgreSQLDatabase postgresql
|
|
|
|
++ stdenv.lib.optional enableSubversionRepository subversion;
|
2011-02-18 16:58:08 +01:00
|
|
|
|
|
|
|
meta = {
|
|
|
|
description = "Provides various activation types for Disnix";
|
|
|
|
license = "MIT";
|
|
|
|
maintainers = [ stdenv.lib.maintainers.sander ];
|
|
|
|
};
|
2009-09-02 12:03:45 +02:00
|
|
|
}
|