oxalica / nocargo

[alpha] Build Rust crates with Nix Build System.
MIT License
138 stars 9 forks source link

Unable to build crate due to unresolved dependency #2

Closed poscat0x04 closed 3 years ago

poscat0x04 commented 3 years ago

I got this error message:

error: Unresolved dependency: {"default_features":true,"features":[],"kind":"normal","name":"hyper-tls","optional":true,"req":"^0.5","resolved":null,"target":"cfg(not(target_arch = \"wasm32\"))","targetEnabled":true}

while trying to build my crate. Not sure why is nocargo trying to build hpyer-tls which doesn't even exist in Cargo.lock.

oxalica commented 3 years ago

Fixed on master. Tested https://github.com/poscat0x04/cloudflare-ddns-rs

Note that your crate requires a nightly rustc. Be sure to regenerate flake.nix using the new nocargo from master, and then manually change the rustc in generated nix to the nightly one using selectLatestNightlyWith or fromRustupToolchainFile. (See README of rust-overlay for more info about them)