lock: add support for locking stdenv + flakerefs#2465
Merged
Conversation
Make the `stdenv` (and other flakerefs) lockable and updateable. This makes it possible to update the stdenv with a regular `devbox update` and simplifies the logic for how the stdenv commit is chosen: 1. If there's no stdenv flakeref in devbox.lock, resolve github:NixOS/nixpkgs/nixpkgs-unstable to a locked ref and store it in the lockfile. 2. Otherwise, use the ref in the lockfile.
e820b88 to
37626bf
Compare
4dbebb6 to
1670810
Compare
1670810 to
3905f67
Compare
mohsenari
approved these changes
Jan 6, 2025
mikeland73
added a commit
that referenced
this pull request
Apr 14, 2025
## Summary fixes: #2532 Possibly also fixes #2535 but need to test. blame: #2465 cc: @Lagoja ## How was it tested? * unit test * manual testing using --pure flag # Community Contribution License All community contributions in this pull request are licensed to the project maintainers under the terms of the [Apache 2 License](https://www.apache.org/licenses/LICENSE-2.0). By creating this pull request, I represent that I have the right to license the contributions to the project maintainers under the Apache 2 License as stated in the [Community Contribution License](https://github.com/jetify-com/opensource/blob/main/CONTRIBUTING.md#community-contribution-license).
maxcharm093
added a commit
to maxcharm093/devbox
that referenced
this pull request
Aug 24, 2025
## Summary fixes: jetify-com/devbox#2532 Possibly also fixes jetify-com/devbox#2535 but need to test. blame: jetify-com/devbox#2465 cc: @Lagoja ## How was it tested? * unit test * manual testing using --pure flag # Community Contribution License All community contributions in this pull request are licensed to the project maintainers under the terms of the [Apache 2 License](https://www.apache.org/licenses/LICENSE-2.0). By creating this pull request, I represent that I have the right to license the contributions to the project maintainers under the Apache 2 License as stated in the [Community Contribution License](https://github.com/jetify-com/opensource/blob/main/CONTRIBUTING.md#community-contribution-license).
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Depends on #2464.
Make the
stdenv(and other flakerefs) lockable and updateable. This makes it possible to update the stdenv with a regulardevbox updateand simplifies the logic for how the stdenv commit is chosen: