2009-09-24 20:22:30 +02:00
|
|
|
{ stdenv, fetchurl, lib, aterm, db4, perl, curl, bzip2, openssl ? null
|
2006-11-17 13:49:46 +01:00
|
|
|
, storeDir ? "/nix/store"
|
|
|
|
, stateDir ? "/nix/var"
|
2008-06-24 11:39:19 +02:00
|
|
|
, supportOldDBs ? true
|
2009-09-10 18:57:37 +02:00
|
|
|
, nameSuffix ? ""
|
2009-09-24 20:22:30 +02:00
|
|
|
, debugcCoercionFailuresPatch ? false
|
|
|
|
/* enabling this experimental patch will output a xml representation of the
|
|
|
|
thing which didn't match the expected type - for debugging only
|
|
|
|
|
|
|
|
The message of
|
|
|
|
let a = {}; in builtins.substring a a a; # always cause failure
|
|
|
|
looks like
|
|
|
|
|
|
|
|
value is an attribute set while an integer was expected
|
|
|
|
<?xml version='1.0' encoding='utf-8'?>
|
|
|
|
<expr>
|
|
|
|
<attrs>
|
|
|
|
</attrs>
|
|
|
|
</expr>
|
|
|
|
*/
|
2009-09-10 18:57:37 +02:00
|
|
|
, patches ? []
|
2006-11-17 13:49:46 +01:00
|
|
|
}:
|
|
|
|
|
2009-09-24 20:22:30 +02:00
|
|
|
|
|
|
|
let
|
|
|
|
|
|
|
|
|
|
|
|
allPatches =
|
|
|
|
patches ++ lib.optional debugcCoercionFailuresPatch
|
|
|
|
(fetchurl { url = http://mawercer.de/~marc/debug-coercion-failures.patch; sha256 = "13q6vbxp3p36hqzlfp0hw84n6f1hzljnxqy73vr2bmglp8np24wy"; });
|
|
|
|
|
|
|
|
vName = "nix-0.13pre17232";
|
|
|
|
name = "${vName}${nameSuffix}${if allPatches == [] then "" else "-patched"}";
|
|
|
|
in
|
|
|
|
|
|
|
|
stdenv.mkDerivation {
|
|
|
|
|
|
|
|
inherit name;
|
2006-11-17 13:49:46 +01:00
|
|
|
|
2007-08-14 18:41:41 +02:00
|
|
|
src = fetchurl {
|
2009-09-17 19:43:20 +02:00
|
|
|
url = "http://hydra.nixos.org/build/75293/download/4/${name}.tar.bz2";
|
|
|
|
sha256 = "aaea96d6dd87f8cceb2973e561d1cd0ca1beeaa0384eb91f4db09ac75d42148f";
|
2007-08-14 18:41:41 +02:00
|
|
|
};
|
2007-08-11 12:34:07 +02:00
|
|
|
|
2007-03-01 16:44:23 +01:00
|
|
|
buildInputs = [perl curl openssl];
|
2006-11-17 13:49:46 +01:00
|
|
|
|
2008-01-30 01:56:10 +01:00
|
|
|
configureFlags = ''
|
2006-11-17 13:49:46 +01:00
|
|
|
--with-store-dir=${storeDir} --localstatedir=${stateDir}
|
2008-06-24 11:39:19 +02:00
|
|
|
--with-aterm=${aterm} --with-bzip2=${bzip2}
|
|
|
|
${if supportOldDBs then "--with-bdb=${db4}" else "--disable-old-db-compat"}
|
2008-01-30 01:56:10 +01:00
|
|
|
--disable-init-state
|
|
|
|
'';
|
2006-11-17 13:49:46 +01:00
|
|
|
|
2009-01-29 17:08:03 +01:00
|
|
|
doCheck = true;
|
|
|
|
|
2009-03-09 16:27:23 +01:00
|
|
|
passthru = { inherit aterm; };
|
|
|
|
|
2006-11-17 13:49:46 +01:00
|
|
|
meta = {
|
|
|
|
description = "The Nix Deployment System";
|
2008-06-24 11:39:19 +02:00
|
|
|
homepage = http://nixos.org/;
|
2007-11-05 12:22:37 +01:00
|
|
|
license = "LGPL";
|
2006-11-17 13:49:46 +01:00
|
|
|
};
|
2009-09-10 18:57:37 +02:00
|
|
|
|
2009-09-24 20:22:30 +02:00
|
|
|
patches = allPatches;
|
2006-11-17 13:49:46 +01:00
|
|
|
}
|