this post was submitted on 18 Jul 2023
3 points (100.0% liked)
nixos
1262 readers
2 users here now
All about NixOS - https://nixos.org/
founded 5 years ago
you are viewing a single comment's thread
view the rest of the comments
view the rest of the comments
You can override derivation inputs and derivation attributes. Let's take for example the nano editor.
You can enable tidy support by overriding the
enableTidy
input like so:(final: prev: { nano = prev.nano.override { enableTidy = true; }; })
You can also override build steps, eg. if you want to apply an upstream patch because you don't want to wait for the next release version, you'd do it like this.
(final: prev: { nano = prev.nano.overrideAttrs ( old: { patches = (old.patches or [] ) ++ [ ./filename.patch ]; }); })
Now the thing about overlays is this: if you change a package in an overlay, all packages depending on that package, either directly or indirectly, will pull in that modified version, which is an extremely powerful tool as you can probably imagine.
It all makes sense now!
I recently had a chance to take a look at the nano.nix file on github responsible for building nano. But I don't see where the enableTidy attribute is declared did you mean enableTiny by any chance?
Yes, I do mean
enableTiny
. Sorry about the confusion :)