-
-
Notifications
You must be signed in to change notification settings - Fork 18.5k
Documentation: guide for using let in vs rec vs finalAttrs #315337
Description
Problem
I often see maintainers and committers alike suggesting to use the let in syntax following the practices suggested by https://nix.dev/guides/best-practices.html. However, this is hardly uniform some would suggest using rec, and it's hard to get a solid grasp on what to use in each situation. This was only exemplified when finalAttrs started popping up more commonly as of recent.
Proposal
From my understanding https://nix.dev is an official source so perhaps it would be best to get everyone on board and aware of this best practice? Or maybe to get a more concrete set of best practices to use in each given situation. Or at the very least make members aware that the let in syntax is said to be the best practice, as stated in https://nix.dev/guides/best-practices.html.
Checklist
- checked latest Nixpkgs manual (source) and latest NixOS manual (source)
- checked open documentation issues for possible duplicates
- checked open documentation pull requests for possible solutions
Add a 👍 reaction to issues you find important.