[Nix-dev] Re: another style proposal

Ludovic Courtès ludo at gnu.org
Mon Apr 5 21:32:16 CEST 2010


Hello,

"Yury G. Kudryashov" <urkud+nix at ya.ru> writes:

> I propose to use the following style.

What are you trying to solve?

> In all-packages.nix:
>
> mypkg = makeOverridable (import ../path/to/mypkg) ( pkgs // { cg = 
> getPkgConfig "mypkg"; } );

It feels wrong to pass all of Nixpkgs to the package function when said
function only needs a few of them.  It breaks the principle of least
authority.

Thanks,
Ludo’.




More information about the nix-dev mailing list