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.
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.