Closed danieldk closed 5 years ago
i created the issues with carnix and crate2nix and have since also created a little test project: https://github.com/gilligan/rs-nix-test
I guess i might be able to fix/add support for this in crate2nix but I prefer to not touch the carnix code base and haven't received any feedback from the author despite multiple attempts on different channels.
Fixed in #68296
Describe the bug
buildRustCrate
and accompanying tools such as Carnix, does not handle renames inCargo.toml
. This is likely to become a more serious issue for users ofbuildRustCrate
soon, sincerand
0.7.0 uses a rename:In such cases, the right invocation of
rustc
adds an extern option like the following:However,
buildRustCrate
with Carnix-generated files currently addsThis issue has been reported in the bug trackers of Carnix and crate2nix, but I thought it would be good to have an issue in the nixpkgs issue tracker in case people run into this issue.
https://nest.pijul.com/pmeunier/carnix/discussions/35 https://github.com/kolloch/crate2nix/issues/22
To Reproduce
Cargo.toml
that hasrand == 0.7
as a transitive dependency.nix-build
Expected behavior
The build succeeds, because it adds the correct
--extern
argument.