-
So far I've been manually downloading and copying a few dependencies from another project (namely The issue is that
I'm pretty sure this is related to the recent discussion about unfriendly dependencies, but I'm curious as to why going the manual-copy route would not have the same issue present when using the git repo. |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
Nix builds derivations in a writable sandbox. This is where the derivation's source is copied to, and presumably where other operations such as applying patches or running other scripts on the source. When you copy other crates into your own source directory (also sometimes called local vendoring) those files make it to the same writable directory and why the build script can happily write to When crates are pulled in via Cargo.toml (whether they come from crates.io or a git repository) they are vendored into the Nix store which is readonly. So you are correct, this issue is because the build script is trying to write into the directory of where its sources are contained. (If you build that crate outside of Nix it might happen to work properly because cargo won't sandbox the The best course of action is to update that build script to write to |
Beta Was this translation helpful? Give feedback.
Nix builds derivations in a writable sandbox. This is where the derivation's source is copied to, and presumably where other operations such as applying patches or running other scripts on the source. When you copy other crates into your own source directory (also sometimes called local vendoring) those files make it to the same writable directory and why the build script can happily write to
src/protos
.When crates are pulled in via Cargo.toml (whether they come from crates.io or a git repository) they are vendored into the Nix store which is readonly. So you are correct, this issue is because the build script is trying to write into the directory of where its sources are contained. (If …