summary refs log tree commit diff
path: root/pkgs/tools
diff options
context:
space:
mode:
authorMarc Weber <marco-oweber@gmx.de>2009-09-24 18:22:30 +0000
committerMarc Weber <marco-oweber@gmx.de>2009-09-24 18:22:30 +0000
commit4d41884f8eed6ec912321c3800608f8f10c6ef8f (patch)
treecf1a0df7b1f47bf510b05b6c7f24aa44c3e66865 /pkgs/tools
parent7620dccae9da4d7e80d9ed6091068e7ac8845d06 (diff)
downloadnixpkgs-4d41884f8eed6ec912321c3800608f8f10c6ef8f.tar
nixpkgs-4d41884f8eed6ec912321c3800608f8f10c6ef8f.tar.gz
nixpkgs-4d41884f8eed6ec912321c3800608f8f10c6ef8f.tar.bz2
nixpkgs-4d41884f8eed6ec912321c3800608f8f10c6ef8f.tar.lz
nixpkgs-4d41884f8eed6ec912321c3800608f8f10c6ef8f.tar.xz
nixpkgs-4d41884f8eed6ec912321c3800608f8f10c6ef8f.tar.zst
nixpkgs-4d41884f8eed6ec912321c3800608f8f10c6ef8f.zip
nixUnstable: adding experimental debug coercion failure patch - for debugging only
svn path=/nixpkgs/trunk/; revision=17405
Diffstat (limited to 'pkgs/tools')
-rw-r--r--pkgs/tools/package-management/nix/unstable.nix36
1 files changed, 32 insertions, 4 deletions
diff --git a/pkgs/tools/package-management/nix/unstable.nix b/pkgs/tools/package-management/nix/unstable.nix
index 68e836ba6ee..375eb148afd 100644
--- a/pkgs/tools/package-management/nix/unstable.nix
+++ b/pkgs/tools/package-management/nix/unstable.nix
@@ -1,13 +1,41 @@
-{ stdenv, fetchurl, aterm, db4, perl, curl, bzip2, openssl ? null
+{ stdenv, fetchurl, lib, aterm, db4, perl, curl, bzip2, openssl ? null
 , storeDir ? "/nix/store"
 , stateDir ? "/nix/var"
 , supportOldDBs ? true
 , nameSuffix ? ""
+, 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>
+   */
 , patches ? []
 }:
 
-stdenv.mkDerivation rec {
-  name = "nix-0.13pre17232${nameSuffix}";
+
+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;
   
   src = fetchurl {
     url = "http://hydra.nixos.org/build/75293/download/4/${name}.tar.bz2";
@@ -33,5 +61,5 @@ stdenv.mkDerivation rec {
     license = "LGPL";
   };
 
-  inherit patches;
+  patches = allPatches;
 }