Skip to content

Releases: ipetkov/crane

v0.18.0

06 Jul 05:05
v0.18.0
0aed560
Compare
Choose a tag to compare

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 and path has been
    updated. Namely, it is no longer necessary to call both (e.g.
    craneLib.cleanCargoSource (craneLib.path ./.)): it is recommended to either
    use craneLib.cleanCargoSource ./. directly (if the default source cleaning
    is desired) or craneLib.path ./. (if not).
  • overrideToolchain has been updated to better handle cross-compilation
    splicing for a customized toolchain. This means that overrideToolchain
    should now be called with a function which constructs said toolchain for any
    given pkgs 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 and crateNameFromCargoToml do their best to avoid IFD when
    src is the result of lib.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.

v0.17.3

03 Jun 03:03
v0.17.3
b65673f
Compare
Choose a tag to compare

0.17.3 - 2024-06-02

Fixed

  • removeReferencesToVendoredSources correctly signs aarch64-darwin builds
    (which was accidentally broken in 0.17.2)

v0.17.2

26 May 17:51
v0.17.2
19ca94e
Compare
Choose a tag to compare

0.17.2 - 2024-05-26

Fixed

  • removeReferencesToVendoredSources has been optimzed to search for source
    references only once. For derivations which install many files, this phase can
    run up to 99% faster than before.
  • cleanCargoToml now cleans underscored versions of the same attributes (e.g.
    lib.proc-macro and lib.proc_macro)

v0.17.1

19 May 22:28
v0.17.1
7443df1
Compare
Choose a tag to compare

0.17.1 - 2024-05-19

Fixed

  • downloadCargoPackage and downloadCargoPackageFromGit no longer run the
    fixup phase by default, avoiding issues with source directories and files
    being moved to different locations
  • downloadCargoPackage now unpacks and installs from a fresh directory,
    avoiding having build environment files (like env-vars) appearing in the
    output

v0.17.0

19 May 01:12
v0.17.0
a4e51f5
Compare
Choose a tag to compare

0.17.0 - 2024-05-18

Added

  • cargoDoc now supports docInstallRoot to influence which directory will be
    installed to $out/share (which can be useful when cross-compiling). By
    default $CARGO_TARGET_DIR and $CARGO_BUILD_TARGET (if set) will be taken
    into account
  • crateNameFromCargoToml now supports selecting a derivation name by setting
    package.metadata.crane.name or workspace.metadata.crane.name in the root
    Cargo.toml
  • vendorCargoDeps, vendorCargoRegistries, vendorGitDeps, and
    vendorMultipleCargoDeps now support arbitrary overrides (i.e. patching) at
    the individual crate/repo level when vendoring sources.

Changed

  • Breaking cargoAudit no longer accepts cargoExtraArgs (since it does
    not support the regular set of cargo flags like most cargo-commands do, it
    does not make much sense to propagate those flags through)
  • buildTrunkPackage now sets env.TRUNK_SKIP_VERSION_CHECK = "true"; if not
    specified

Deprecations

  • In the future, crateNameFromCargoToml will stop considering
    workspace.package.name in the root Cargo.toml when determining the crate
    name. This attribute is not recognized by cargo (which will emit its own
    warnings about it) and should be avoided going forward.
  • In the future, crane.lib.${system} will be removed. Please switch to using
    (crane.mkLib nixpkgs.lib.${system}) as an equivalent alternative.

v0.16.6

04 May 17:09
v0.16.6
c5ee437
Compare
Choose a tag to compare

0.16.6 - 2024-05-04

Fixed

  • Same as 0.16.5 but with the correct tag deployed to Flakestry/FlakeHub

v0.16.5

04 May 17:08
v0.16.5
d707d41
Compare
Choose a tag to compare

0.16.5 - 2024-05-04

Fixed

  • Workspace inheritance for git dependencies now ignores (removes) all comments
    around dependency declarations to work around a mangling bug in toml_edit
    (see #527 and
    toml-rs/toml#691)

v0.16.4

04 May 17:00
v0.16.4
9caad1e
Compare
Choose a tag to compare

0.16.4 - 2024-04-07

Added

  • Added a warning if an unsupported version of nixpkgs is used

Changed

  • cargoNextest now supports setting withLlvmCov which will automatically run
    cargo llvm-cov nextest. Note that withLlvmCov = true; is (currently) only
    supported when partitions = 1;

Fixed

  • inheritCargoArtifactsHook and installCargoArtifactsHook now correctly
    handle the case when CARGO_TARGET_DIR is set to a nested directory
  • Dependency vendoring now correctly takes unused patch dependencies into
    account

v0.16.3

19 Mar 22:20
v0.16.3
5bace74
Compare
Choose a tag to compare

0.16.3 - 2024-03-19

Changed

  • Sources are now fetched crates.io's CDN, following cargo's (new) default behavior.

Fixed:

  • vendorMultipleCargoDeps correctly lists registries as an optional
    parameter

v0.16.2

22 Feb 00:03
v0.16.2
03d6232
Compare
Choose a tag to compare

0.16.2 - 2024-02-21

Changed

  • cleanCargoToml now also strips out [lints] and [workspace.lints]
    definitions. This means avoiding unnecessarily rebuilding dependencies when
    the lint definitions change, and it avoids issues with failing to build
    dummified sources which might have violated a lint marked as deny or
    forbid

Fixed

  • Fixed an edge case with inheriting workspace dependencies where the workspace
    dependency is a string (e.g. foo = "0.1.2") but the crate definition is a
    table (e.g. foo = { workspace = true, optional = true })