Skip to content

best way to pull in a file from a sibling directory? #375

@greglearns

Description

@greglearns

My flake.nix file is right next to the rust build.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 added 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!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions