* Source vendoring is passed as a standalone attribute to
`mkCargoDerivation`, meaning it does not automagically get spliced
with the correct local/cross system inputs (i.e. what would happen if
it was a `depsBuildBuild` entry)
* To fix this we need to make sure that `vendorCargoDeps` and all of its
transitive dependencies always use `runCommand` (and friends) from
their `pkgsBuildBuild` equivalent. This should always be safe to do
(even for cross-builds) since this amounts to building up a bunch of
sources which will be read by the build system
* Unfortunately I had to manually specify `pkgsBuildBuild.whatever` in
multiple places as I could not get things to work by messing with the
`callPackage` definition. Perhaps we should be using
`makeScopeWithSplicing'` instead of `makeScope` when constructing the
library, but I couldn't get it working (and I couldn't find any decent
docs on how to use it online) so this will make do for the time being.
With Cargo 1.68.0, sparse registries were made stable. With sparse
registries, index metadata is stored in an HTTP api rather than in
a git repository.
As relevant to Crane, the relevant changes are mostly that registries
do not always start with `registry+` and mostly start with `registry+`
or `sparse+` depending on whether the registry is sparse or not.
This PR adjusts the core of Crane to differentiate between `registry`
and `sparse`, and adds a new sparse registry factory to make things
easy.
---------
Co-authored-by: Ivan Petkov <ivanppetkov@gmail.com>