0.7.0 - 2022-09-28
Added
cargoDoc
can now be used for building the documentation of a workspacecleanCargoSource
can now be used to filter sources to only include cargo and
Rust files (and avoid rebuilds when irrelevant files change).
filterCargoSources
is the underlying filter implementation and can be
composed with other filtersremoveReferencesToVendoredSourcesHook
defines a post-install hook which will
remove any references to vendored sources from any installed binaries. Useful
for preventing nix from considering the binaries as having a (runtime)
dependency on said sources
Changed
- Breaking:
mkCargoDerivation
now includes a defaultconfigurePhase
which does nothing but run thepreConfigure
andpostConfigure
hooks. This
is done to avoid breaking builds by including puts happen to have setup-hooks
which try to claim the configure phase (such ascmake
). To get the old
behavior back, setconfigurePhase = null;
in the derivation. mkCargoDerivation
(along with any of its callers likecargoBuild
,
buildPackage
, etc.) now accept astdenv
argument which will override the
default environment (coming frompkgs.stdenv
) for that particular derivationmkDummySrc
now acceptsextraScript
which can be used to run a custom
script, and therefore customize what the dummy source containsbuildDepsOnly
now acceptsdummySrc
as a way to directly pass in the dummy
source to be used. Automatically derived viaargs.src
if not specified.
Fixed
cargoAudit
properly keeps anyaudit.toml
files when cleaning the sourcebuildPackage
now has more robust checks to ensure that all references to
vendored sources are removed after installation (which avoids consumers of the
final binaries having to download the sources as well)mkDummySrc
how handles build scripts in a manner which ensures cargo runs
the real script later (instead of thinking it has not changed)