-
Notifications
You must be signed in to change notification settings - Fork 249
[rm nixpkgs] use path-from-hash-part command when updating lock file #1442
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
Current dependencies on/for this PR:
This comment was auto-generated by Graphite. |
38d681e
to
e870ed8
Compare
@gcurtis instead of running this logic in the CLI, I'm now thinking it may make sense for the search indexer to run it. WDYT? |
This is something we should add to the API, but feel free to keep it as a workaround until the API is updated. I plan on adding a new {
"store_hash": "00263n102bi1r6qihvdghxb3jx6n3k1d",
"store_name": "libcxxabi",
"store_version": "16.0.6",
"outputs": [
{
"path": "/nix/store/00263n102bi1r6qihvdghxb3jx6n3k1d-libcxxabi-16.0.6",
"name": "out",
"hash": "00263n102bi1r6qihvdghxb3jx6n3k1d",
"default": true
},
{
"path": "/nix/store/04r1bxcai0bzb2z01n5r47j8r2387s2r-libcxxabi-16.0.6-dev",
"name": "dev",
"hash": "04r1bxcai0bzb2z01n5r47j8r2387s2r",
"default": false
}
]
} The |
@gcurtis That would be neat. A few questions:
which are set as:
And unfortunately then we'd need to install this |
Lets land this PR then so we can start dogfooding internally! |
Default isn't always just the first output. Some packages define multiple outputs to install by default. That's a good point about the cache check. I think the best approach would be to add a
I had to look this one up to double check. It looks like all of the prometheus outputs are cached, including
Edit: it looks like |
Summary
Motivation
With Remove Nixpkgs feature on, installing
[email protected]
was failing with:Explanation
Thanks to @gcurtis.
curl’s first (and therefore default) output is
bin
, notout
, so Nix is appending-bin
to the path.From
man nix-build
:Fix
Observe:
So:
devbox update
, we derive the store-path from the search API and write todevbox.lock
hash-name-version
from search API responsenix store path-from-hash-part <hash>
and write the response store-path in thedevbox.lock
.devbox.lock
, and print a warning. Maybe we should track it in sentry?How was it tested?