0.10.0 - 2022-12-01
Added
- A new installation mode has been defined which symlinks identical cargo
artifacts against previously generated ones. This allows for linear space
usage in the Nix store across many chained derivations (as opposed to using a
zstd compressed tarball which uses quadratic space across many chained
derivations). mkDummySrc
optionally accepts adummyrs
argument which allows for
customizing the contents of the dummy Rust files that will be generated.
Changed
- Breaking: all cargo-based derivations will now default to using symlinking
their installed artifacts together instead of using zstd compressed tarballs.
To get the old behavior back, setinstallCargoArtifactsMode = "use-zstd";
in
the derivation.- Note that
buildPackage
will continue to use zstd compressed tarballs while
building dependencies (unless either ofcargoArtifacts
or
installCargoArtifactsMode
is defined, in which case they will be honored)
- Note that
- Breaking: the format for defining crate registries has been changed: each
registry URL should map to a set containing adownloadUrl
attribute. This
set may also definefetchurlExtraArgs
(another set) which will be forwarded
to thefetchurl
invocations for crates for that registry. - Breaking (technically):
buildDepsOnly
will now only default to running
cargo check
with the--all-targets
flag only ifdoCheck = true;
is set on
the derivation (otherwise the flag is omitted). To get the previous behavior
back simply setcargoCheckExtraArgs = "--all-targets";
. registryFromGitIndex
now uses shallow checkouts for better performanceregistryFromDownloadUrl
andregistryFromGitIndex
now allow specifying
fetchurlExtraArgs
which will be forwarded to thefetchurl
invocations for
crates for that registry
Fixed
- Unpacking a git repository now ignores duplicate crates to match cargo's
behavior - Sped up stripping references to source files
- Dummy sources now import the
core
crate more robustly (playing more nicely
withcargo-hakari
) - Building a crate's dependencies automatically works for uefi targets