[Nix-dev] getConfig vs packageOverrides

Arie Middelkoop amiddelk at gmail.com
Mon Feb 20 12:39:30 CET 2012


Configuration options seem to me nicer if it's about turning particular 
features on/off. In particular, this seems pretty nice for specifying 
global preferences for packages, like enabling pulseaudio support, 
bluetooth support, etc.

If you use optional arguments and packageOverrides to set them, then you 
potentially have more control, but since you are actually cloning a bit 
of code, it may require more maintenance on your side and it may require 
more effort to find the right arguments.

 From an engineering perspective, you'll want to limit the configuration 
space (e.g. take suitable defaults for everybody and discourage people 
from choosing different options). Then again, that's sometimes just not 
possible... and it's very nice that these mechanisms are available to 
customize your configuration.

Arie

On 19-02-12 21:29, Mathijs Kwik wrote:
> Hi all,
>
> When writing packages with optional dependencies and other config
> options, I can choose to get these options through an optional
> argument to the function, or to use getConfig to fetch them from
> nixpkgs.config.
>
> Setting them by either nixpkgs.config or by using packageOverrides to
> set the extra arguments/
>
> Is there a preferred way? Or does it depend on the situation?
> Situations thus far:
> - optional dependency
> - optional configure flags
> - optional patches
>
> Thanks,
> Mathijs
> _______________________________________________
> nix-dev mailing list
> nix-dev at lists.science.uu.nl
> http://lists.science.uu.nl/mailman/listinfo/nix-dev



More information about the nix-dev mailing list