Closed Fuuzetsu closed 2 years ago
If you have something like
[package] name = "repro" version = "0.1.0" edition = "2021" [dependencies] [dev-dependencies] renamed_itoa = { version = "0.4.8", features = ["i128"], package = "itoa" }
crate2nix does not generate a renamed package, it instead generates something like
{ name = "itoa"; packageId = "itoa 0.4.8"; features = [ "i128" ]; }
It does the right thing if the dependency is moved to [dependencies]
[dependencies]
{ name = "itoa"; packageId = "itoa 0.4.8"; rename = "renamed_itoa"; features = [ "i128" ]; }
It seems like this is intended to work as I see this:
dependenciesWithRenames = lib.filter (d: d ? "rename") ( filterEnabledDependenciesForThis ( (crateConfig.buildDependencies or [ ]) ++ (crateConfig.dependencies or [ ]) ++ devDependencies ) );
Maybe somewhere in crate2nix the rename code forgot to be plugged in for dev-dependencies and build-dependencies?
dev-dependencies
build-dependencies
This is a problem if we have overlapping but renamed packages outside of dependencies.
dependencies
That does indeed look like a bug!
I'll try to take a look today.
If you have something like
crate2nix does not generate a renamed package, it instead generates something like
It does the right thing if the dependency is moved to
[dependencies]
It seems like this is intended to work as I see this:
Maybe somewhere in crate2nix the rename code forgot to be plugged in for
dev-dependencies
andbuild-dependencies
?This is a problem if we have overlapping but renamed packages outside of
dependencies
.