[Nix-dev] Re: [Nix-commits] SVN commit: nix - 12563 - raskin - in nixpkgs/trunk/pkgs: os-specific/linux/klibc top-level

Marc Weber marco-oweber at gmx.de
Mon Aug 11 13:15:57 CEST 2008


>  What does "composedArgsAndFun" do?  (And it's almost certainly not a good 
>  name ;-)  Also, I really dislike all those weird nulls in all-packages.nix.
I haven't look at the source, but I guess it's similar to the question
you've asked once: It merges the given attr sets until null is passed.
The first function is applied to the merge attr sets then.

composedArgsAndFun = f : lib.composedArgs (arg : (f arg)//{meta={function=(composedArgsAndFun f) arg;};});

So it first applies the summed attr sets to f and adds a
meta.function attribute beeing equal to the function used to get the
result but without applied null (so that you still can override stuff?)

Possible use case :
        buildInputs = [ (subversion.meta.function { perlSupport = true; } null) ];

(I know that this use case has been discussed multiple times and that
some kind of conses has been reached that we prefer not overriding flags
per package but to globally configure them to not have multiple packages
installed (?)... Matter of taste)
Maybe there are other use cases as well ?

Marc



More information about the nix-dev mailing list