版本发布 8
## 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.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.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`
## 0.20.3 - 2025-04-23 ### Added * `mkCrossToolchainEnv` is now available for setting up some default cross-compilation environment variables and derivation arguments ### Changed * Vendoring git dependencies now respects Cargo.toml `includes` and `excludes` * `mkCargoDerivation` now configures the cross-compilation toolchain by default using the newly added `mkCrossToolchainEnv` function. To select the utilized cross compiler, the `stdenv` argument now also accepts a selector function, taking an arbitrary `pkgs` instantiation as an argument. This behavior can be turned off by setting `doIncludeCrossToolchainEnv = false;`.
## 0.20.2 - 2025-03-08 ### Changed * `craneUtils` (used internally for vendoring git dependencies) now uses `importCargoLock` to fetch its own dependencies instead of the (now deprecated) `fetchCargoTarball` method. * `cleanCargoToml` now preserves the `proc-macro` attribute of any defined targets ### Fixed * `buildTrunkPackage` no longer ignores `installPhase` and `installPhaseCommand` args. * `mkDummySrc` now supports embedded proc-macros. * `removeReferencesToRustToolchainHook` now handles file names which contain whitespace * `removeReferencesToVendoredSourcesHook` now handles file names which contain whitespace
## 0.20.1 - 2025-02-08 ### Added * `cargoNextest` now supports passing `cargoNextestPartitionsExtraArgs` to each `cargo nextest` partition run. * Add self-reference `craneLib` to crane lib instance. * Add `removeReferencesToRustToolchainHook`, which, by default, removes references to the Rust toolchain from all installed binaries ### Changed * `buildPackage` now includes `removeReferencesToRustToolchainHook` as a native dependency. To disable automatically removing references to the Rust toolchain, set `doNotRemoveReferencesToRustToolchain = true;` * `mkCargoDerivation` now will also append the `rustc` package to the derivation's `nativeBuildInputs`