flake: drop flake-utils#401
Conversation
- Depend on nix-systems directly instead of transitively.
- Drop flake-utils
- Implement our own mapAttrs-based "for each system"
---
Flake lock file updates:
• Removed input 'flake-utils'
• Removed input 'flake-utils/systems'
• Added input 'systems':
'github:nix-systems/default/da67096a3b9bf56a91d16901293e51ba5b49a27e?narHash=sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768%3D' (2023-04-09)
jfly
left a comment
There was a problem hiding this comment.
LGTM. We could use the pinned nixpkgs's lib if you want some quality of life helper functions, though.
Reading this code made me realize 2 surprising things:
- I hadn't realized our
default.nixreturns a derivation. Kind of odd. I guess the intent is to abstract all the other details away from folks who just want our main package. - I don't think we need to provide the
apps.default.nix runwill usepackages.${system}.defaultif it doesn't find anapps.${system}.default.
It's also a bit inconvinent, as the derivation uses IFD and in order to evaluate other unrelated attrs, we need to evaluate the IFD. This means
Yeah, I guess the intent is to support Out of scope for this PR, but worth considering a refactor where we move most of
IIUC it's still a best practice to define Happy to add a
There are a few ways I could've got a nixpkgs lib instance, from our npins. The reason I avoided it is that it's quite wasteful to evaluate an instance of |
I noticed we were using flake-utils, which is a bit of an overkill dependency for our minimal flake setup.
mapAttrs-based "for each system"genAttrs, instead of instantiating an extranixpkgs/libinstance