Skip to content

Releases: ipetkov/crane

v0.14.2

15 Oct 20:25
v0.14.2
8cb0282
Compare
Choose a tag to compare

0.14.2 - 2023-10-15

Added

  • replaceCargoLockHook can now be used to easily replace or insert a
    Cargo.lock file in the current derivation

Changed

  • cargoAudit will pass --ignore yanked by default if cargoAuditExtraArgs
    are not specified. This is because cargo-audit cannot check for yanked
    crates from inside of the sandbox. To get the old behavior back, set
    cargoAuditExtraArgs = "";.
  • mkCargoDerivation (and by extension anything which delegates to it) will now
    automatically use the value of cargoLock or the contents of
    cargoLockContents/cargoLockParsed to replace the workspace Cargo.lock
    file. To disable this behavior, set doNotReplaceCargoLock = true;.

Fixed

  • Fixed handling of Cargo workspace inheritance for git-dependencies where said
    crate relies on reading non-TOML metadata (i.e. comments) from its Cargo.toml
    at build time. (#407)
  • Fixed handling of dummy target names to avoid issues with cargo doc.
    (#410)
  • When using installCargoArtifactsMode = "use-zstd"; all files will be marked
    as user-writable while compressing
  • removeReferencesToVendoredSources now signs aarch64-darwin binaries. (#418)

v0.14.1

23 Sep 23:25
v0.14.1
3de322e
Compare
Choose a tag to compare

0.14.1 - 2023-09-23

Fixed

  • Fixed a bug where buildPackage would fail to inherit artifacts from
    dependency crates if cargoArtifacts was not explicitly specified.

v0.14.0

22 Sep 05:12
v0.14.0
9dae37b
Compare
Choose a tag to compare

0.14.0 - 2023-09-21

Added

  • Added devShell, a thin wrapper around pkgs.mkShell which automatically
    provides cargo and rustc.
  • Added the ability to specify output hashes of git dependencies for fully
    offline evaluations. The outputHashes attribute can now be optionally
    specified in vendorCargoDeps, vendorGitDeps, vendorMultipleCargoDeps, or
    anything else which delegates to them.

Changed

  • Breaking (technically): buildDepsOnly, buildPackage, cargoBuild,
    cargoClippy, cargoDoc, cargoLlvmCov, and cargoTest's defaults have
    been changed such that if cargoExtraArgs have not been set, a default value
    of --locked will be used. This ensures that a project's committed
    Cargo.lock is exactly what is expected (without implicit changes at build
    time) but this may end up rejecting builds which were previously passing. To
    get the old behavior back, set cargoExtraArgs = "";
  • Breaking: cargoDoc will no longer install cargo artifacts by default.
    Set doInstallCargoArtifacts = true; to get the old behavior back.
  • cargoDoc will now install generated documentation in $out/share/doc
  • Fixed a bug when testing proc macro crates with cargoNextest on macOS.
    (#376)
  • Replaced various internal usages of runCommandLocal with runCommand for
    more optimal behavior when downloading cached artifacts

v0.13.1

22 Sep 05:11
v0.13.1
ef5d11e
Compare
Choose a tag to compare

0.13.1 - 2023-08-22

Changed

  • buildTrunkPackage will now use dart-sass instead of nodePackages.sass
  • Vendoring git dependencies will now always resolve symlinks inside of a
    crate's directory. This allows for symlinks inside of a crate's directory to
    possibly refer to files at the root of the git repo itself (via symlink) and
    have those contents preserved during vendoring.

v0.13.0

07 Aug 15:45
v0.13.0
6c25eff
Compare
Choose a tag to compare

0.13.0 - 2023-08-07

Added

  • buildPackage now supports installing dylib targets
  • Added support for sparse registries

Changed

  • Breaking: dropped compatibility for Nix versions below 2.13.3
  • Breaking: dropped compatibility for nixpkgs-22.05. nixpkgs-23.05 and
  • Breaking (technically): if buildPackage is called without setting
    cargoArtifacts, the default buildDepsOnly invocation will now stop running
    any installation hooks
  • Breaking (technically): buildPackage no longer installs cargo binary
    dependencies (i.e. when the bindeps feature is used) by default
  • inheritCargoArtifactsHook will now symlink dependency .rlib and .rmeta
    files. This means that derivations which reuse existing cargo artifacts will
    run faster as fewer files (and bytes!) need to be copied around. To disable
    this behavior, set doNotLinkInheritedArtifacts = true;.
  • cargoTarpaulin will now set doNotLinkInheritedArtifacts = true; unless
    otherwise specified
  • Update crane-utils dependencies for successful build in nightly Rust (2023-06-28)

v0.12.2

07 Jun 03:38
v0.12.2
8ab1a49
Compare
Choose a tag to compare

0.12.2 - 2023-06-06

Added

  • Added support for the Trunk wasm app build tool

Changed

  • resolver key is no longer cleaned from Cargo.toml

Fixed

  • buildTrunkPackage will now strip references to store files by default

v0.12.1

11 Apr 01:17
v0.12.1
445a3d2
Compare
Choose a tag to compare

0.12.1 - 2023-04-10

Added

  • vendorMultipleCargoDeps can now be used to vendor crates from multiple
    distinct Cargo.lock files. Notably this allows for building the standard
    library (via -Z build-std or equivalent) since both the project's
    and the Rust toolchain's Cargo.lock files can be vendored together

Changed

  • vendorCargoRegistries now accepts a registries parameter from the caller.
    If not specified, it will be computed via cargoConfigs. Also cargoConfigs
    is now an optional parameter which will default to [] if not specified.

Fixed

  • vendorCargoDeps correctly accepts arguments which have not set src, so
    long as one of cargoLock, cargoLockContents, or cargoLockParsed is set

v0.12.0

20 Mar 04:16
v0.12.0
2552a2d
Compare
Choose a tag to compare

0.12.0 - 2023-03-19

Added

  • Add a stubbed binary target to each "dummy" crate generated to support
    "artifact dependencies" nightly feature
    in case a crate is used as bin artifact dependency.
  • Add cargoLlvmCov to run cargo llvm-cov
  • Add cargoLockParsed option to vendorCargoDeps to support Cargo.lock
    files parsed as nix attribute sets.
  • craneLib.path can now be used as a convenience wrapper on (or drop in
    replacement of) builtins.path to ensure reproducible results whenever paths
    like ./. or ./.. are used directly.

Changed

  • Breaking (technically): mkCargoDerivation will remove the following
    attributes before lowering to mkDerivation: cargoLock, cargoLockContents
    and cargoLockParsed. If your derivation needs these values to be present
    they can be explicitly passed through via .overrideAttrs
    buildDepsOnly as dummySrc will take priority
  • The API docs have been updated to refer to craneLib (instead of just lib)
    to avoid ambiguities with pkgs.lib.
  • cargo is now invoked with --release when $CARGO_PROFILE == release instead
    of passing in --profile release to better support tools which do not
    understand the latter

Fixed

  • Fixed support for projects depending on crates utilising per-target workspace dependencies.

v0.11.3

19 Feb 22:47
v0.11.3
953b70d
Compare
Choose a tag to compare

0.11.3 - 2023-02-19

Fixed

  • Fixed an unintentional cache invalidation whenever buildDepsOnly would run
    on an unfiltered source (like src = ./.;).

Changed

  • A warning will now be emitted if a derivation's pname or version
    attributes are not set and the value cannot be loaded from the derivation's
    root Cargo.toml. To resolve it consider setting pname = "..."; or version = "..."; explicitly on the derivation.
  • A warning will now be emitted if src and dummySrc are passed to
    buildDepsOnly as dummySrc will take priority

v0.11.2

11 Feb 23:47
v0.11.2
c6b5c57
Compare
Choose a tag to compare

0.11.2 - 2023-02-11

Fixed

  • buildPackage is more tolerant of misbehaving proc macros which write to
    stdout during the build