-
-
Notifications
You must be signed in to change notification settings - Fork 40k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
shell.nix: keep Nixpkgs pinned, but allow override #7703
Conversation
This refines PR qmk#6213 (commit 8dc9764), which pinned Nixpkgs. In general, pinning Nixpkgs is a good idea. But there's some problems with pinning it so hard. It makes it harder to experiment with more modern Nixpkgs without forking the codebase. In general it's nicer to be current if we can, because it decreases the likelihood of cache misses and having to pull a ton of stuff down from Hydra. So this commit tries to get the best of both worlds. The pinned version is still there as a default. But I can easily override it to test out later versions (which we'll want to do periodically anyway to not be perpetually stuck on an ancient version of Nixpkgs).
My testing was largely to run Also, this was done in a way that should be non-breaking with other people consuming this expression, since I used a default argument for the function. |
@jbaum98 As the original author of the pinning, could you please give this a look! |
Sounds like a good idea and looks good to me. My only thought is that maybe we want to provide a way to change the base nixkgs but use our overlay. Maybe we can also pull the overlay above the function and add an overlays argument whose default value is just our overlay? That way you can customize nixpkgs and the overlays separately. That's just a thought though, no need to wait on merging this if no one actually needs that functionality. |
@jbaum98 if it looks good to you, would you mind approving it then? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sorry, didn't realize I had the ability to approve things!
@jbaum98 everyone does. Only collaborators get a green check mark, but anyone can approve. |
Thank you for your contribution! |
Yeah I think so, though in the long run we might want to move to the new nix flakes model, which handles things like pinning and also allows for people to potentially run things in this repository without even cloning it, something like |
Yes, this PR is defunct. |
This refines PR #6213 (commit 8dc9764), which pinned Nixpkgs.
In general, pinning Nixpkgs is a good idea. But there's some problems with
pinning it so hard. It makes it harder to experiment with more modern Nixpkgs
without forking the codebase. In general it's nicer to be current if we can,
because it decreases the likelihood of cache misses and having to pull a ton of
stuff down from Hydra.
So this commit tries to get the best of both worlds. The pinned version is
still there as a default. But I can easily override it to test out later
versions (which we'll want to do periodically anyway to not be perpetually stuck
on an ancient version of Nixpkgs).
Description
Types of Changes
Issues Fixed or Closed by This PR
Checklist