[Nix-dev] [Want to commit this week] deepOverride replacement when callPackage is used

Eelco Dolstra e.dolstra at tudelft.nl
Fri Sep 3 10:45:16 CEST 2010


Hi,

On 09/03/2010 10:44 AM, Michael Raskin wrote:

> On 09/03/2010 12:29 PM, Eelco Dolstra wrote:
>>> 	Part one: gtkLibs220 has no __overrides. So gtk depends on default glib
>>> unless you basically copy-paste everything. Proposed solution
>>> (instantiation checked, gives the same unless you use overrides):
> 
>> As far as I can tell this is not necessary.  When I introduced callPackage, I
>> actually took care that overriding packages in sets like gtkLibs is still
>> possible :-)
> 
>> For instance, you can stick this in ~/.nixpkgs/config.nix:
> 
>>   packageOverrides = pkgs: rec {
>>     gtkLibs220 = pkgs.gtkLibs220 // {
>>       glib = pkgs.gtkLibs218.glib;
>>     };
>>   };
> 
> How you _add a package_ that currently works better (only) with
> non-default glib? What you propose is way too global - you have to
> reimport nixpkgs even to install software with different glib's into
> current-system, let alone add a package into NixPkgs.

You probably missed this sentence:

  I assume this also works from within all-packages.nix.

You can do this (deep) override for a specific package by calling pkgsFun with
the desired override.

-- 
Eelco Dolstra | http://www.st.ewi.tudelft.nl/~dolstra/



More information about the nix-dev mailing list