nix-community / crate2nix

rebuild only changed crates in CI with crate2nix and nix
https://nix-community.github.io/crate2nix/
Apache License 2.0
354 stars 83 forks source link

export: `CARGO_FEATURE_DEP:LAZY_STATIC=1': not a valid identifier #222

Closed bbigras closed 2 years ago

bbigras commented 2 years ago

crate2nix 0.10.0

@nix { "action": "setPhase", "phase": "unpackPhase" }
unpacking sources
unpacking source archive /nix/store/rllys9szh8pnhlkwggwflhh2kz0kk77h-crossbeam-utils-0.8.7.tar.gz
source root is crossbeam-utils-0.8.7
@nix { "action": "setPhase", "phase": "patchPhase" }
patching sources
@nix { "action": "setPhase", "phase": "configurePhase" }
configuring
Running cd .
Building build.rs (crossbeam-utils)
Running rustc --crate-name build_script_build build.rs --crate-type bin -C opt-level=3 -C codegen-units=4 --edition 2018 --cfg feature="default" --cfg feature="dep:lazy_static" --cfg feature="lazy_static" --cfg f>
/nix/store/vhdfrizjvb4p58wkidl8hmn5gnp9zbxv-stdenv-linux/setup: line 1516: export: `CARGO_FEATURE_DEP:LAZY_STATIC=1': not a valid identifier
ben0x539 commented 2 years ago

cargo doesnt seem to include dep: features in either the CARGO_FEATURE_FOO env vars or the rustc commandline does it

JJJollyjim commented 2 years ago

I implemented a fix, using env commands to escape the colons: https://github.com/JJJollyjim/nixpkgs/commit/051ed25169aeea412d795cb62d8a4f19859d9415

However, if @ben0x539 is correct, I guess we should filter them out instead?

Fuuzetsu commented 2 years ago

This is now a much bigger concer since Rust 1.60 is out

PlumpMath commented 2 years ago

export: `CARGO_FEATURE_DEP:QUOTE=1': not a valid identifier nixpkgs; I hope it gets fixed soon.

nightkr commented 2 years ago

This seems to have been fixed by https://github.com/NixOS/nixpkgs/pull/168865, and shouldn't require any further action here.

Ericson2314 commented 2 years ago

Glad it is fixed. Thanks @duxovni!