[Nix-dev] Re: [Nix-commits] SVN commit: nix - 17405 - MarcWeber - in nixpkgs/trunk/pkgs: tools/package-management/nix top-level

Ludovic Courtès ludo at gnu.org
Thu Sep 24 22:38:43 CEST 2009


Hello!

Marc Weber <marco-oweber at gmx.de> writes:

> Author: MarcWeber
> Date: 2009-09-24 18:22:30 +0000 (Thu, 24 Sep 2009)
> New Revision: 17405

[...]

> nixUnstable: adding experimental debug coercion failure patch - for debugging only

[...]

> --- nixpkgs/trunk/pkgs/tools/package-management/nix/unstable.nix	2009-09-24 18:22:26 UTC (rev 17404)
> +++ nixpkgs/trunk/pkgs/tools/package-management/nix/unstable.nix	2009-09-24 18:22:30 UTC (rev 17405)
> @@ -1,14 +1,42 @@
> -{ 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"}";

IMO Nixpkgs trunk is really *not* the place for such experiments.
Nixpkgs is supposed to hold Nix expressions for packages developed by
other people, period.  Adding experimental patches to packages is likely
to confuse and annoy users.

I suggest that you keep such patches local to your Nixpkgs development
tree, or in upstream repository (that of Nix, in this case).

Thanks,
Ludo’.



More information about the nix-dev mailing list