Releases: ipetkov/crane
Releases · ipetkov/crane
v0.23.3
0.23.3 - 2026-04-16
Changed
downloadCargoPackagenow extracts tarballs with--no-same-owner.
Ultimately this should make no difference since the Nix store will reset all
ownership permissions anyway, but it may avoid some spurious errors on certain
systems.buildPackageandbuildDepsOnlynow has acargoBuildExtraArgsoption for
passing arguments specifically tocargoBuildCommand.cargoNextestnow acceptscargoNextestArchiveExtraArgsfor passing
flags tocargo nextest archiveinvocations.writeTOMLnow, by default, refers towriteTOMLViaCraneUtilsto minimize
dependency chains on non-Rust projects. Bringing back the old behavior (using
remarshal) can be done viacraneLibRemarshal = craneLib.overrideScope (final: prev: { writeTOML = final.writeTOMLViaRemarshal; });
Deprecations
mkCargoDerivation(and by extension all utilities which delegate to it) no
longer support overriding thestdenvused formkDerivationvia an
attribute. Instead any such overrides should be done at thecraneLiblevel
via the newstdenvSelectorfunction. For example:(crane.mkLib pkgs).overrideScope (final: prev: { stdenvSelector = p: p.clangStdenv; });
v0.23.2
0.23.2 - 2026-03-23
Added
buildTrunkPackagecan now process css assets with tailwind
usingrel="tailwind-css"in the index.html iftailwindcssis present and
executable at build time (i.e. included as a nativeBuildInput).
Changed
- Update
crane-utilsdependencies, namely depending ontoml_edit@0.25which
now includes parsing support for TOML 1.1 cargoNextestnow defaults to settingNEXTEST_SHOW_PROGRESS=counterunless
otherwise specified (settingenv.NEXTEST_SHOW_PROGRESSor passing in
--show-progress=...will take precedence). This avoids progress bar
(re)painting from resulting in garbled build logs
Fixed
findCargoFiles(and by extensionmkDummySrcandvendorCargoDeps) will
now always respect source filters, meaning any ignoredCargo.tomlor
.cargo/config.tomlfiles will no longer be processed and included during
processing.
v0.23.1
0.23.1 - 2026-02-14
Added
cleanCargoTomlcan now be customized using thecleanCargoTomlFilterargumentmkDummySrccan now pass thecleanCargoTomlFilterargument tocleanCargoTomlcraneLib.filtersexposescargoTomlAggressive,cargoTomlConservative, and
cargoTomlDefaultfor composition of custom filters forcleanCargoTomldownloadCargoPackageFromGitnow usescargo package -lfor generating the file
list, resulting in more accurate include/exclude rule interpretation. This fixes
builds in some dependencies, notablyaws-lc-rsfrom git.
v0.23.0
0.23.0 - 2026-01-13
Changed
- Breaking:
mkCargoDerivationnow no longer automatically includes the
remapPathPrefixHookas a nativeBuildInput. Unfortunately, this hook's
implementation will lead to cache invalidation if built on a Nix
implementation outside of NixOS (see the API documentation for more details).
Thus using this hook is now opt-in.
v0.22.0
0.22.0 - 2025-12-26
Changed
- Breaking: dropped compatibility for Nix versions below 2.31.2
- Breaking: dropped compatibility for nixpkgs-25.05
remapPathPrefixHookis now do nothing when building on Darwin since the
current implementation results in validating build caches due to Nix behavior
differences between Linux and Darwin.
Fixed
mkCargoDerivationwill now setnoCompressDebugSectionsSetto disable
compressing debug sections (whenremapPathPrefixHookis active and running)
on platforms which do not support it
v0.21.3
0.21.3 - 2025-12-04
Added
- Add
remapSourcePathPrefixHook, which can map source code file paths to their
correct location within the Nix store. By default this hook will run for any
dontStrip = truebuilds, but can otherwise be controlled using
doRemapPathPrefix.
Fixed
downloadCargoPackageFromGitnow correctly includes any files listed in a
.ignorefile (but otherwise not listed in.gitignore) when unpacking git
checkouts.
v0.21.2
0.21.2 - 2025-11-07
Changed
mkDummySrcnow acceptsdummyBuildrsto customize the dummy source used for
build scripts specifically. If not specified, the value ofdummyrswill be
used, otherwise, the existing default dummy build script will be used.
Fixed
- Fix Windows pthreads being added to non-Windows platforms when cross compiling
v0.21.1
0.21.1 - 2025-09-24
Fixed
- The default dummy source used by
mkDummySrcnow additionally works for the
amdgputarget out of the box removeReferencesToRustToolchainHooknow handles exclusions case
insensitivelycleanCargoTomlnow retains targets'harnessattribute if definedcargoTest,cargoDocTest, andcargoNextestwill log a warning ifdoCheck = false;installCargoArtifactsHookgracefully handles (ignores) situations where no
cargo artifacts are generated by the derivation
v0.21.0
0.21.0 - 2025-07-19
Changed
- Breaking: dropped compatibility for Nix versions below 2.28.3
- Breaking: dropped compatibility for nixpkgs-24.11
- Windows cross builds provides pthreads as it is required for most crates.
registryFromSparsenow passesfetchurlExtraArgsto the initial query for the
registry'sconfig.json
v0.20.3
0.20.3 - 2025-04-23
Added
mkCrossToolchainEnvis now available for setting up some default
cross-compilation environment variables and derivation arguments
Changed
- Vendoring git dependencies now respects Cargo.toml
includesandexcludes mkCargoDerivationnow configures the cross-compilation toolchain by default
using the newly addedmkCrossToolchainEnvfunction. To select the utilized
cross compiler, thestdenvargument now also accepts a selector function,
taking an arbitrarypkgsinstantiation as an argument. This behavior can be
turned off by settingdoIncludeCrossToolchainEnv = false;.