-
Notifications
You must be signed in to change notification settings - Fork 86
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
crate2nix attempts to build binaries without their target-specific required-features #129
Comments
Thank you for the report! Oh, yeah, at a first glance, I'd say this is unsupported. I was unaware of this feature. Target-specific features. Makes sense. ;) You can probably workaround this limitation easily by enabling the relevant features at the build root manually: https://github.com/kolloch/crate2nix#dynamic-feature-resolution Tell me if that works for you! |
Yep, the workaround definitely works :) I've now properly investigated Cargo's default behavior (I assumed it would automatically enable the feature), but it turns out to match crate2nix pretty well, except with a nice error instead of attempting to build:
Or, using
|
Ah, OK, if we copied this behavior:
|
I encountered this issue while I was performing usual EDIT: The |
For example, try generating and building https://github.com/aahancoc/tree_magic/tarball/0.2.3
The binary fails to build since it can't find
clap
. Here's the relevant Cargo.toml snippet:And here's the diffedDefaultPackageFeatures:
Thanks :)
The text was updated successfully, but these errors were encountered: