nix-community / naersk

Build Rust projects in Nix - no configuration, no code generation, no IFD, sandbox friendly.
MIT License
728 stars 87 forks source link

No access to root crate file in sub-crate #327

Open gkze opened 5 months ago

gkze commented 5 months ago

I'm trying to build https://github.com/pantsbuild/pants, and there's a VERSION file @ src/rust/engine that gets accessed by a macro in src/rust/engine/pantsd/src, which is a sub-crate of the workspace. But when I run a build I get the error that there is no such file or directory. How can I get around this?

otoayana commented 2 months ago

Hi! Ran into a similar issue, and I fixed it by setting singleStep to true before building, as mentioned in https://github.com/nix-community/naersk/issues/45#issuecomment-561103965