-
Notifications
You must be signed in to change notification settings - Fork 248
[remove nixpkgs] enable fallback for packages not in binary store #1236
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
Conversation
76f3bf1
to
60cefb4
Compare
Current dependencies on/for this PR:
This comment was auto-generated by Graphite. |
60cefb4
to
a70becd
Compare
@mikeland73 ping |
config.allowUnfree = true; | ||
}); | ||
{{- end }} | ||
{{- end }} |
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.
these lines are the same as in the current flake.nix
:
https://github.com/jetpack-io/devbox/blob/main/internal/shellgen/tmpl/flake.nix.tmpl#L27-L34
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.
This is only for cases where the RemoveNixpkgs
feature flag is on?
yep |
## Summary builds on top of #1236 Goal: We should be able to install the package without downloading nixpkgs. Changes made to: - `nixprofile.ProfileInstall`: use `/nix/store/<hash>` as `installable` - `nixprofile.ProfileListIndex`: return index when `item.nixStorePath == pkg.PathInStore` - `devpkgs.Package.ValidateExists`: `true` if `IsInBinaryStore` - `devpkgs.Package.EnsureNixpkgsPrefetched`: skip if `IsInBinaryStore`. ## How was it tested? `devbox add [email protected]` and `devbox rm [email protected]` - [x] nixpkgs not downloaded
Summary
Many testscript unit-tests were failing because they use unversioned legacy packages like
"hello"
, as opposed tohello@latest
, orhello@<version>
.These legacy packages do not use the Binary Cache Store.
I considered whether we should treat them automatically as upgraded to
@latest
, but decided against:Package.IsInBinaryStore
easier to reason about.We should instead encourage users to
devbox update
their packages: which our messaging already does.The remaining three testscript unit-tests are failing due to "unable to find nix executable" errors. Will fix in followup.
How was it tested?
enabled feature-flag and ran testscripts: https://github.com/jetpack-io/devbox/actions/runs/5417704606/jobs/9848964717?pr=1236