When I’m using rustPlatform.buildRustPackage
, what should i do if some dependencies are from github or other non-crates.io-hostnames?
I was trying to package popsicle , but the project has two dependencies pulled from github, and it creates an error that it cannot resolve hostname github.com .
naersk would be a possible solution, but it doesn’t fit in nixpkgs super well, maybe i can just keep it in my own repository
naersk doesn’t work yet eather
opened 10:04PM - 25 Mar 21 UTC
There seems to be a limit to fetching git dependencies
```
Updating git … repository `https://github.com/eugene-babichenko/eccoxide.git`
warning: spurious network error (2 tries remaining): [6] Couldn't resolve host name (Could not resolve host: github.com); class=Net (12)
warning: spurious network error (1 tries remaining): [6] Couldn't resolve host name (Could not resolve host: github.com); class=Net (12)
error: failed to get `eccoxide` as a dependency of package `chain-vote v0.1.0 (https://github.com/input-output-hk/chain-libs.git?branch=master#74d592bf)`
... which is depended on by `jormungandr-lib v0.10.0-alpha.3 (/build/dummy-src/jormungandr-lib)`
Caused by:
failed to load source for dependency `eccoxide`
Caused by:
Unable to update https://github.com/eugene-babichenko/eccoxide.git?branch=fast-u64-scalar-mul#d921d475
Caused by:
failed to clone into: /build/dummy-src/.cargo-home/git/db/eccoxide-9ed018ce0504c263
Caused by:
network failure seems to have happened
if a proxy or similar is necessary `net.git-fetch-with-cli` may help here
https://doc.rust-lang.org/cargo/reference/config.html#netgit-fetch-with-cli
Caused by:
[6] Couldn't resolve host name (Could not resolve host: github.com); class=Net (12)
[naersk] cargo returned with exit code 101, exiting
```
adding the `eccoxide` dependency in the top-level Cargo.toml and regenerating the Cargo.lock seems to fix the issue was the dependency will be properly captured.