Re: [Nix-dev] ‘callPackage’ vs. ‘all-packages.nix’
    Marc Weber 
    marco-oweber at gmx.de
       
    Tue Sep 15 18:16:06 CEST 2009
    
    
  
> >     - Use "{ arg1, arg2, ... }:" in the package's function definition
> >       (i.e. use the ellipis "..." to allow arbitrary additional
> >       arguments), and then call the function with all of "pkgs" as an
> >       argument.  But this inhibits error detection if you call it with
> >       an misspelled (or obsolete) argument.
Eelco Dolstra, can you explain this inhibiting of error detection?
I mean when writing this:
  all-packages.nix :
    vice = import ../misc/emulators/vice pkgs;
  vice/default.nix :
    { dep1, dep2, ... }:
    [..]
    buildInputs = [ dep1 dep2 ];
you can't misspell dep1 dep2 without passing wrong arguments.
So I only see a reimplementation of the ellipsis here because they are
no not listed in all-packages neither using using callPackage nor using
ellipis.
So what makes the difference exactly?
It even adds a redundant function call to each package (thus some
complexity) to all-packages.nix.
Marc Weber
    
    
More information about the nix-dev
mailing list