Programming & DevOps
Nix Overlays: Add attribute to “lib” and avoid “infinite recursion error”
The other day, I was about to add an attribute to pkgs.lib using a nixpkgs overlay. There is a small and subtle pitfall when doing so, which made me create this short blog post. A basic overlay looks like this: By looking at the architecture diagram, we see that both prev and final refer to what pkgs is, just in different “generations” (or iteration steps) in the evaluation of the final nixpkgs instance. Read more…