best way to pull in a file from a sibling directory? #395
Replies: 3 comments
-
Hi @greglearns ! Could you share your Two possible situations come to mind:
|
Beta Was this translation helpful? Give feedback.
-
https://gist.github.com/greglearns/a8f63f33040248411f5ef281dde51e33
|
Beta Was this translation helpful? Give feedback.
-
Ah I see! I had misunderstood the original description and didn't realize that As far as I understand, flakes do not allow accessing files in parent directories (only sub-directories relative to their location) so there's two approaches which come to mind for resolving this:
Hope this helps! |
Beta Was this translation helpful? Give feedback.
-
My
flake.nix
file is right next to the rustbuild.rs
file, and build.rs needs to load a file../spec/service.proto
. All of these files are I've read the documentation https://crane.dev/source-filtering.html but I'm relatively new to nix, I'm not sure how to make this work, and I've tried a few times to make it work and I can't figure it out. I have this directory structure:|root
|.git <--- all of the files below have been
git add
ed and so the flake should be able to find them.|-- rust
|-- flake.nix
|-- build.rs <-- this needs to read the ../spec/service.proto file.
|-- src/
|-- spec/service.proto
Any suggestions?
P.S. Thank you for crane!
Beta Was this translation helpful? Give feedback.
All reactions