Skip to content

Build failures with non-workspace path deps #778

Answered by ipetkov
andrewbaxter asked this question in Q&A
Discussion options

You must be logged in to vote

Hi @andrewbaxter thanks for the report!

When you specify src = ./crate_a; you are instructing Nix to add an entry to the store with the contents of the crate_a directory and then use that as the source for the derivation. That means when the builder runs inside of the sandbox, it can only see the contents of crate_a (recursively), but it cannot access any other directories outside of that. At this point there is nothing crane (or naersk for that matter) can do to circumvent the sandbox.

Even if it could, the Cargo.toml will contain a ../crate_b entry which, inside of the sandbox, will attempt to get resolved as /nix/store/<hash>-source-of-crate_a/../crate_b which will simplify to /nix/sto…

Replies: 1 comment 2 replies

Comment options

You must be logged in to vote
2 replies
@andrewbaxter
Comment options

@ipetkov
Comment options

Answer selected by ipetkov
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants
Converted from issue

This discussion was converted from issue #777 on January 05, 2025 18:09.