Skip to content

Fixed-output derivation variant of vendorCargoDeps #831

@simonzkl

Description

@simonzkl

Is your feature request related to a problem? Please describe.
When src is a derivation, it's not possible to evaluate the package derivation without triggering IFD. This is because vendorCargoDeps parses Cargo.lock at evaluation time. When there's many remote crane packages, the evaluation grinds to a halt.

Describe the solution you'd like
It would be nice if vendorCargoDeps (or a variant of it) was able to vendor dependencies by parsing Cargo.lock at build time. This would of course turn the vendor derivation into a fixed-output derivation (FOD), which would require maintianing an output hash. But this is alright in some circumstances (e.g. a centralized packate reporistory where updates are automated).

Describe alternatives you've considered
There's nixpkgs's fetchCargoVendor which is a fixed-output derivation, however it doesn't support custom registries like crane does. If crane is not interested in filling this niche, maybe extending fetchCargoVendor would make more sense.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions