2013-06-27 15:32:11 +02:00
|
|
|
{ stdenv, fetchurl
|
2013-11-06 14:22:48 +01:00
|
|
|
, ejabberd ? null, mysql ? null, postgresql ? null, subversion ? null, mongodb ? null
|
2013-06-27 15:32:11 +02:00
|
|
|
, enableApacheWebApplication ? false
|
|
|
|
, enableAxis2WebService ? false
|
|
|
|
, enableEjabberdDump ? false
|
|
|
|
, enableMySQLDatabase ? false
|
|
|
|
, enablePostgreSQLDatabase ? false
|
|
|
|
, enableSubversionRepository ? false
|
|
|
|
, enableTomcatWebApplication ? false
|
2013-11-06 14:22:48 +01:00
|
|
|
, enableMongoDatabase ? false
|
2013-06-27 15:32:11 +02:00
|
|
|
, catalinaBaseDir ? "/var/tomcat"
|
2014-03-30 21:38:49 +02:00
|
|
|
, getopt
|
2013-06-27 15:32:11 +02:00
|
|
|
}:
|
|
|
|
|
|
|
|
assert enableMySQLDatabase -> mysql != null;
|
|
|
|
assert enablePostgreSQLDatabase -> postgresql != null;
|
|
|
|
assert enableSubversionRepository -> subversion != null;
|
|
|
|
assert enableEjabberdDump -> ejabberd != null;
|
2013-11-06 14:22:48 +01:00
|
|
|
assert enableMongoDatabase -> mongodb != null;
|
2013-06-27 15:32:11 +02:00
|
|
|
|
|
|
|
stdenv.mkDerivation {
|
2013-11-06 14:22:48 +01:00
|
|
|
name = "dysnomia-0.3pred677260f77bb202c7490f7db08dbd8442c9db484";
|
2013-06-27 15:32:11 +02:00
|
|
|
src = fetchurl {
|
2014-03-30 21:38:49 +02:00
|
|
|
url = http://hydra.nixos.org/build/9146265/download/1/dysnomia-0.3pre313a5f99a166fee2e0245dfd25f41ec9ed958075.tar.gz;
|
|
|
|
sha256 = "0fgbqybr9rfr95fkmv1hpq7al0p1kxa385k6sjc7iwwcxs4cmxf5";
|
2013-06-27 15:32:11 +02: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"}
|
|
|
|
${if enablePostgreSQLDatabase then "--with-postgresql" else "--without-postgresql"}
|
|
|
|
${if enableSubversionRepository then "--with-subversion" else "--without-subversion"}
|
|
|
|
${if enableTomcatWebApplication then "--with-tomcat=${catalinaBaseDir}" else "--without-tomcat"}
|
2013-11-06 14:22:48 +01:00
|
|
|
${if enableMongoDatabase then "--with-mongodb" else "--without-mongodb"}
|
2013-06-27 15:32:11 +02:00
|
|
|
'';
|
|
|
|
|
2014-03-30 21:38:49 +02:00
|
|
|
buildInputs = [ getopt ]
|
2013-06-27 15:32:11 +02:00
|
|
|
++ stdenv.lib.optional enableEjabberdDump ejabberd
|
|
|
|
++ stdenv.lib.optional enableMySQLDatabase mysql
|
|
|
|
++ stdenv.lib.optional enablePostgreSQLDatabase postgresql
|
2013-11-06 14:22:48 +01:00
|
|
|
++ stdenv.lib.optional enableSubversionRepository subversion
|
|
|
|
++ stdenv.lib.optional enableMongoDatabase mongodb;
|
2013-06-27 15:32:11 +02:00
|
|
|
|
|
|
|
meta = {
|
2013-07-01 14:27:18 +02:00
|
|
|
description = "Automated deployment of mutable components and services for Disnix";
|
2013-06-27 15:32:11 +02:00
|
|
|
license = "MIT";
|
|
|
|
maintainers = [ stdenv.lib.maintainers.sander ];
|
|
|
|
};
|
|
|
|
}
|