-
-
Notifications
You must be signed in to change notification settings - Fork 14.1k
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
buildCargoPackage fails when a dependency uses [workspace.dependencies]
#202762
Comments
rust-lang/cargo#11192 might be the upstream issue related to this |
Building packages which use workspace dependencies is currently broken in Nixpkgs (see NixOS/nixpkgs#202762), so as a hack workaround for this, all dependencies here have been specified inline instead.
As a workaround, you can patch away the workspace dependency feature from the Cargo.toml inside the vendor dir |
Upstream merged a fix for this recently though of course it'll be a while before it's available in a release: rust-lang/cargo#11414 |
It seems this is fixed now based on your repro, so can this be closed? |
I think so. I conducted a little test of my own and using |
We actually even have tests for this in tree now, so this can be closed. |
Describe the bug
When a rust crate uses workspace.dependencies and a nix package attempts to depend on it, building fails:
Steps To Reproduce
Try building a test package that depends on such a crate:
Expected behavior
It should build!
Additional context
Removing the workspace.dependencies (and updating the package to use it) allows the build to work normally.
This issue presumably interacts with cargo vendor and
importCargoLock
in some way, but I'm not really sure what's at fault here?Metadata
Please run
nix-shell -p nix-info --run "nix-info -m"
and paste the result.The text was updated successfully, but these errors were encountered: