0.18.0 - 2024-07-05
Changed
- Breaking: dropped compatibility for Nix versions below 2.18.2
- Breaking: dropped compatibility for nixpkgs-23.11.
- The guidance around using (both)
cleanCargoSource
andpath
has been
updated. Namely, it is no longer necessary to call both (e.g.
craneLib.cleanCargoSource (craneLib.path ./.)
): it is recommended to either
usecraneLib.cleanCargoSource ./.
directly (if the default source cleaning
is desired) orcraneLib.path ./.
(if not). overrideToolchain
has been updated to better handle cross-compilation
splicing for a customized toolchain. This means thatoverrideToolchain
should now be called with a function which constructs said toolchain for any
givenpkgs
instantiation. For example:craneLib.overrideToolchain (p: p.rust-bin.stable.latest.default)
Fixed
- The cross compilation example also hows how to set the
TARGET_CC
environment
variable which may be required by some build scripts to function properly vendorCargoDeps
andcrateNameFromCargoToml
do their best to avoid IFD when
src
is the result oflib.cleanSourceWith
(and by extension
cleanCargoSource
)removeReferencesToVendoredSources
handles the edge case where
cargoVendorDir
does not point to a path within the Nix store- It is now possible to use
.overrideScope
to change what instance of
craneUtils
will be used during vendoring.