nix-community / crate2nix

rebuild only changed crates in CI with crate2nix and nix
https://nix-community.github.io/crate2nix/
Apache License 2.0
364 stars 86 forks source link

allow git deps to have workspaces #281

Closed apoelstra closed 11 months ago

apoelstra commented 1 year ago

This should be correctly credited to @marius851000 since I copied it directly from https://github.com/kolloch/crate2nix/pull/166/, since it was a narrow part of that changeset that I could understand/justify.

What it does is, in the case that you have a git reference to a crate whose git repo contains workspaces, e.g. mutagen, then rather than trying to directly use the root Cargo.toml (which has no information, just a list of workspaces), it parses it to find the path to the actual Cargo.toml for the crate we're trying to depend on, and uses that.

kolloch commented 11 months ago

Thank you, @marius851000 and @apoelstra !

Ericson2314 commented 10 months ago

Could we have a test for this?