2007-11-13 16:52:16 +01:00
|
|
|
{ stdenv, fetchurl, aterm, db4, perl, curl, bzip2, openssl ? null
|
|
|
|
, storeDir ? "/nix/store"
|
|
|
|
, stateDir ? "/nix/var"
|
2007-11-14 02:20:17 +01:00
|
|
|
, src
|
|
|
|
, preConfigure ? ""
|
|
|
|
, autoconf ? null, automake ? null, libtool ? null
|
|
|
|
, bison ? null
|
|
|
|
, flex ? null
|
|
|
|
, w3m ? null
|
2009-09-19 13:40:36 +02:00
|
|
|
, libxml2 ? null
|
2007-11-14 02:20:17 +01:00
|
|
|
, docbook5_xsl ? null, libxslt ? null
|
|
|
|
, docbook5 ? null, docbook_xml_dtd_43 ? null
|
2011-05-02 10:29:01 +02:00
|
|
|
, perlPackages
|
2010-10-30 13:21:06 +02:00
|
|
|
, boehmgc ? null
|
2010-10-30 14:01:02 +02:00
|
|
|
, pkgconfig ? null
|
2011-02-10 18:13:48 +01:00
|
|
|
, sqlite ? null
|
2007-11-14 02:20:17 +01:00
|
|
|
, configureFlags ? []
|
2008-05-06 09:03:09 +02:00
|
|
|
, lib
|
|
|
|
, enableScripts ? []
|
2007-11-13 16:52:16 +01:00
|
|
|
}:
|
|
|
|
|
|
|
|
stdenv.mkDerivation {
|
|
|
|
name = "nix-custom";
|
|
|
|
|
|
|
|
inherit src;
|
|
|
|
|
2007-11-14 02:20:17 +01:00
|
|
|
buildInputs = [perl curl openssl]
|
|
|
|
++ (if automake != null then [automake] else [])
|
|
|
|
++ (if autoconf != null then [autoconf] else [])
|
|
|
|
++ (if libtool != null then [libtool] else [])
|
|
|
|
++ (if bison != null then [bison] else [])
|
|
|
|
++ (if flex != null then [flex] else [])
|
|
|
|
++ (if docbook5_xsl != null then [docbook5_xsl] else [])
|
|
|
|
++ (if libxslt != null then [libxslt] else [])
|
|
|
|
++ (if docbook5 != null then [docbook5] else [])
|
|
|
|
++ (if docbook_xml_dtd_43 != null then [docbook_xml_dtd_43] else [])
|
|
|
|
++ (if w3m != null then [w3m] else [])
|
2009-09-19 13:40:36 +02:00
|
|
|
++ (if libxml2 != null then [libxml2] else [])
|
2010-10-30 13:21:06 +02:00
|
|
|
++ (if boehmgc != null then [boehmgc] else [])
|
2011-02-10 18:13:48 +01:00
|
|
|
++ (if sqlite != null then [sqlite] else [])
|
2010-10-30 14:01:02 +02:00
|
|
|
++ (if pkgconfig != null then [pkgconfig] else [])
|
2007-11-14 02:20:17 +01:00
|
|
|
;
|
2007-11-13 16:52:16 +01:00
|
|
|
|
2008-05-06 09:03:09 +02:00
|
|
|
preConfigure =
|
2008-05-26 16:01:11 +02:00
|
|
|
(lib.concatMapStrings (script:
|
|
|
|
''
|
2012-01-18 18:23:41 +01:00
|
|
|
sed -e '/bin_SCRIPTS = /a${script} \\' -i scripts/Makefile.am
|
2008-05-26 16:01:11 +02:00
|
|
|
''
|
|
|
|
) enableScripts)
|
|
|
|
+ preConfigure
|
|
|
|
+ "\n./bootstrap.sh";
|
2007-11-14 02:20:17 +01:00
|
|
|
|
2008-05-26 16:01:11 +02:00
|
|
|
configureFlags = ''
|
2007-11-13 16:52:16 +01:00
|
|
|
--with-store-dir=${storeDir} --localstatedir=${stateDir}
|
|
|
|
--with-aterm=${aterm} --with-bdb=${db4} --with-bzip2=${bzip2}
|
2011-02-10 18:13:48 +01:00
|
|
|
--with-sqlite=${sqlite}
|
2008-05-26 16:01:11 +02:00
|
|
|
--disable-init-state
|
2011-05-02 10:29:01 +02:00
|
|
|
--with-dbi=${perlPackages.DBI}/lib/perl5/site_perl
|
|
|
|
--with-dbd-sqlite=${perlPackages.DBDSQLite}/lib/perl5/site_perl
|
2008-05-26 21:04:19 +02:00
|
|
|
${toString configureFlags}
|
2008-05-26 16:01:11 +02:00
|
|
|
'';
|
2007-11-13 16:52:16 +01:00
|
|
|
|
|
|
|
meta = {
|
|
|
|
description = "The Nix Deployment System";
|
2008-11-14 17:57:19 +01:00
|
|
|
homepage = http://nixos.org/;
|
2007-11-13 16:52:16 +01:00
|
|
|
license = "LGPL";
|
|
|
|
};
|
|
|
|
}
|