Build failures with non-workspace path deps #778
-
Describe the bug That issue has a community workaround, but it doesn't work with Reproduction
and build
will produce the error. |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 2 replies
-
Hi @andrewbaxter thanks for the report! When you specify Even if it could, the Cargo.toml will contain a You have several options to remedy this:
Hope this helps! |
Beta Was this translation helpful? Give feedback.
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 thecrate_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 ofcrate_a
(recursively), but it cannot access any other directories outside of that. At this point there is nothingcrane
(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…