[Nix-dev] how to overwrite a derivation in nix
Marc Weber
marco-oweber at gmx.de
Fri Jan 10 12:57:44 CET 2014
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
More information about the nix-dev
mailing list