[Nix-dev] how to overwrite a derivation in nix
Alex Berg
chexxor at gmail.com
Fri Jan 10 14:16:29 CET 2014
I've got a page on this topic in the wiki tree I'm working on. Maybe it can
help you.
https://nixos.org/wiki/Nix_Modifying_Packages
Let me know if it's missing your use-case, I'll try to add to it.
On Jan 10, 2014 5:57 AM, "Marc Weber" <marco-oweber at gmx.de> wrote:
> option 1: use ~/.nixpkgs/config.nix, see wiki "how to keep multiple
> packages up to date" or such.
>
> option 2: use applyGlobalOverrides
> problem: its not exposed by pkgs AFAIK
>
> option 3: when importing nipkgs pass config.nix (like option 1)
>
> option 4: use deepOverride (see lib.misc.nix)
>
> Then it would look like
> something_having_thunar_as_dep.deepOverride {
> thunar = patch-thunar-here
> }
>
> Now it looks like you don't want to "override", instead you want to
> reuse a build and add a patch only giving it a new name, this is done by
> overrideDerivation found in lib/customization.nix
>
> thunar is in xfce/core/thunar, and no top-level in all-packages.nix
> and eg ./pkgs/desktops/xfce/core/xfdesktop.nix|2| depends on it.
>
> Thus you might need any of the deep overriding methods listed above if
> you want packages to change depending on it.
>
> Eventually the most simple thing is to create a git topic branch and
> just apply your change.
>
> Marc Weber
> _______________________________________________
> nix-dev mailing list
> nix-dev at lists.science.uu.nl
> http://lists.science.uu.nl/mailman/listinfo/nix-dev
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.science.uu.nl/pipermail/nix-dev/attachments/20140110/5b9d9e2d/attachment.html
More information about the nix-dev
mailing list