Tags: ipetkov/crane
Tags
## 0.23.4 - 2026-05-17
### Added
* `writeTOMLViaCraneUtils`: write toml file in the Nix store using a TOML to
JSON conversion implemented by a `crane` utility tool. Useful for flattening
dependency chains and avoid dragging in `remarshal` and all of its
dependencies.
* `writeTOMLViaRemarshal`: the previous implementation of `writeTOML`, now
explicitly separated for backwards compatibility.
### Changed
* `writeTOML` now, by default, refers to `writeTOMLViaCraneUtils` to minimize
dependency chains on non-Rust projects. Bringing back the old behavior (using
`remarshal`) can be done via `craneLibRemarshal = craneLib.overrideScope
(final: prev: { writeTOML = final.writeTOMLViaRemarshal; });`
### Fixed
* The default dummy source for UEFI correctly builds for no_std environments.
* `craneUtils` is now uses `writableTmpDirAsHomeHook` to better control cargo's
home directory placement, avoiding issues on non-sandboxed builds.
## 0.23.3 - 2026-04-16
### Changed
* `downloadCargoPackage` now 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.
* `buildPackage` and `buildDepsOnly` now has a `cargoBuildExtraArgs` option for
passing arguments specifically to `cargoBuildCommand`.
* `cargoNextest` now accepts `cargoNextestArchiveExtraArgs` for passing
flags to `cargo nextest archive` invocations.
### Deprecations
* `mkCargoDerivation` (and by extension all utilities which delegate to it) no
longer support overriding the `stdenv` used for `mkDerivation` via an
attribute. Instead any such overrides should be done at the `craneLib` level
via the new `stdenvSelector` function. For example: `(crane.mkLib
pkgs).overrideScope (final: prev: { stdenvSelector = p: p.clangStdenv; });`
## 0.23.2 - 2026-03-23 ### Added * `buildTrunkPackage` can now process css assets with tailwind using `rel="tailwind-css"` in the index.html if `tailwindcss` is present and executable at build time (i.e. included as a nativeBuildInput). ### Changed * Update `crane-utils` dependencies, namely depending on `toml_edit@0.25` which now includes parsing support for TOML 1.1 * `cargoNextest` now defaults to setting `NEXTEST_SHOW_PROGRESS=counter` unless otherwise specified (setting `env.NEXTEST_SHOW_PROGRESS` or passing in `--show-progress=...` will take precedence). This avoids progress bar (re)painting from resulting in garbled build logs ### Fixed * `findCargoFiles` (and by extension `mkDummySrc` and `vendorCargoDeps`) will now always respect source filters, meaning any ignored `Cargo.toml` or `.cargo/config.toml` files will no longer be processed and included during processing.
## 0.23.1 - 2026-02-14 ### Added * `cleanCargoToml` can now be customized using the `cleanCargoTomlFilter` argument * `mkDummySrc` can now pass the `cleanCargoTomlFilter` argument to `cleanCargoToml` * `craneLib.filters` exposes `cargoTomlAggressive`, `cargoTomlConservative`, and `cargoTomlDefault` for composition of custom filters for `cleanCargoToml` * `downloadCargoPackageFromGit` now uses `cargo package -l` for generating the file list, resulting in more accurate include/exclude rule interpretation. This fixes builds in some dependencies, notably `aws-lc-rs` from git.
## 0.23.0 - 2026-01-13 ### Changed * **Breaking**: `mkCargoDerivation` now no longer automatically includes the `remapPathPrefixHook` as 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*.
## 0.22.0 - 2025-12-26 ### Changed * **Breaking**: dropped compatibility for Nix versions below 2.31.2 * **Breaking**: dropped compatibility for nixpkgs-25.05 * `remapPathPrefixHook` is 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 * `mkCargoDerivation` will now set `noCompressDebugSectionsSet` to disable compressing debug sections (when `remapPathPrefixHook` is active and running) on platforms which do not support it
## 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 = true` builds, but can otherwise be controlled using `doRemapPathPrefix`. ### Fixed * `downloadCargoPackageFromGit` now correctly includes any files listed in a `.ignore` file (but otherwise not listed in `.gitignore`) when unpacking git checkouts.
## 0.21.2 - 2025-11-07 ### Changed * `mkDummySrc` now accepts `dummyBuildrs` to customize the dummy source used for build scripts specifically. If not specified, the value of `dummyrs` will 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
## 0.21.1 - 2025-09-24 ### Fixed * The default dummy source used by `mkDummySrc` now additionally works for the `amdgpu` target out of the box * `removeReferencesToRustToolchainHook` now handles exclusions case insensitively * `cleanCargoToml` now retains targets' `harness` attribute if defined * `cargoTest`, `cargoDocTest`, and `cargoNextest` will log a warning if `doCheck = false;` * `installCargoArtifactsHook` gracefully handles (ignores) situations where no cargo artifacts are generated by the derivation
## 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. * `registryFromSparse` now passes `fetchurlExtraArgs` to the initial query for the registry's `config.json`
PreviousNext