-
Notifications
You must be signed in to change notification settings - Fork 88
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Building crate that has a git submodule that is a crate that one depends on as a path dependency seems to fail? #287
Comments
Could you try passing gitSubmodules = true; to buildPackage? 👀 |
I think I am already doing it. Check the example repository? |
Ah, right - I didn't see that on the phone 😅 So, in this case you're actually hitting a limitation of Nix: This can be worked around by doing: defaultPackage = naersk-lib.buildPackage {
src = self; # voilà
}; ... committing all the changes (so that you have a clean Git tree, it's important) and then running: nix build '.?submodules=1' I think there's nothing Naersk could do on its side to overcome this issue, since we just read the Fortunately, there's a pull request to improve this: |
I was able to get around this by removing the submodule and instead using cargo to fetch the dependency for me. Thanks for looking into this! |
Description
I have rust crate, that lives in a git repo.
It has a dependency, that is a git submodule. And I am using
In my
Cargo.toml
to depend on it.nix build
fails.I have created a test repository with a minimal reproducible example: https://github.com/molysgaard/naersk-issuereport
Maybe I am doing something wrong, if so, I would be very happy for guidance in how to do it right. If not, I am interested in support for this use case.
Readme of minimal example repo below:
This repository shows an error I am getting when I am trying to use Naersk to compile a rust crate which has a git submodule inside it.
To reproduce:
Observe the following error:
On inspecting the
dummy-src/
directory, there is noitoa
directory, implying that the submodule has not been fetched for some reason.The text was updated successfully, but these errors were encountered: