Skip to content

Running without network/under Nix #331

@sin-ack

Description

@sin-ack

I'd like to run cargo-udeps as a Nix flake check. Currently, if cargo udeps is run inside a derivation, I get the following error:

Updating crates.io index
warning: spurious network error (3 tries remaining): [6] Could not resolve hostname (Could not resolve host: index.crates.io)
warning: spurious network error (2 tries remaining): [6] Could not resolve hostname (Could not resolve host: index.crates.io)
warning: spurious network error (1 try remaining): [6] Could not resolve hostname (Could not resolve host: index.crates.io)
error: failed to get `derive_more` as a dependency of package `mycrate v0.6.0-a.3 (/nix/store/alznnir5902mg8ja6l92y2idhqv6ydha-source/crates/mycrate)`

Caused by:
  download of config.json failed

Caused by:
  failed to download from `https://index.crates.io/config.json`

Caused by:
  [6] Could not resolve hostname (Could not resolve host: index.crates.io)

Would it be possible to fetch all dependencies ahead-of-time somehow?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions