back

by kristjansson·5y ago·view on hn ↗
Interesting, thanks for the pointers.

So AIUI the second, recommended method, it's overwriting the source location for that particular package, and then letting nix build that with an otherwise unchanged nix recipe/script/thing? Am I responsible (at the point of use) to make any other changes required to make that version build successfully? Do dependents of that package get rebuilt too?

1 comments
An overlay could define a package with the same name as one from a lower level.

IE python = super.python...

It could also completely override the entire definition of something if you wanted.

IE python = super.stdenv.mkDerivation { ... };

But you can also add new names, and not modify the existing definitions.

IE python-for-me = super.python.overrideAttrs (...);

In the last case you can reference your modified copy while other things in nixpkgs can use the one built upstream.