Skip to content
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

Update cargo builder to fetch registry dynamically. #27964

Closed
wants to merge 1 commit into from

Commits on Aug 6, 2017

  1. Update cargo builder to fetch registry dynamically.

    The biggest benefit is that we no longer have to update the registry
    package. This means that just about any cargo package can be built by
    nix. No longer does `cargo update` need to be feared because it will
    update to packages newer then what is available in nixpkgs.
    
    This works very similarly to the old technique except instead of using
    cargo's internal cache and stripping out as much as possible it uses the
    new custom registry support to generate a minimal registry with
    exactly what we need.
    
    Like this existing method this will download crates multiple times for
    different packages. This is a shame because the Cargo.lock hash hashes
    inside of it but Nix doesn't really support this.
    
    This also uses the new --frozen and --locked flags which is nice.
    
    Currently cargo-local-registry only provides binaries for Linux and
    macOS 64-bit. This can be solved by building it for the other
    architectures and uploading it somewhere (like the NixOS cache).
    
    This also has the downside that it requires a change to everyone's deps
    hash. And if the old one is used because it was cached it will fail to
    build as it will attempt to use the old version.
    kevincox committed Aug 6, 2017
    Configuration menu
    Copy the full SHA
    5be1f32 View commit details
    Browse the repository at this point in the history