2022-01-31 03:26:55 +03:00
|
|
|
# Changelog
|
|
|
|
All notable changes to this project will be documented in this file.
|
|
|
|
|
|
|
|
The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/)
|
|
|
|
and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.html).
|
|
|
|
|
2022-02-13 20:49:03 +03:00
|
|
|
## Unreleased
|
2023-06-08 04:00:25 +03:00
|
|
|
|
2024-11-19 01:39:07 +03:00
|
|
|
## [0.19.2] - 2024-11-18
|
|
|
|
|
2024-11-08 23:39:11 +03:00
|
|
|
### Added
|
|
|
|
* Added a number of fileset helpers to more easily compose source filtering:
|
|
|
|
* `fileset.cargoTomlAndLock`: for `Cargo.toml` and `Cargo.lock` files
|
|
|
|
* `fileset.commonCargoSources`: for files commonly used by cargo projects
|
|
|
|
* `fileset.configToml`: for `config.toml` files
|
|
|
|
* `fileset.rust`: for `*.rs` files
|
|
|
|
* `fileset.toml`: for `*.toml` files
|
|
|
|
|
2024-11-08 21:25:05 +03:00
|
|
|
### Fixed
|
|
|
|
* `buildTrunkPackage` will pass in `--release=true` (instead of just
|
|
|
|
`--release`) for trunk versions 0.21 or higher to avoid argument ambiguities
|
2024-11-19 00:22:55 +03:00
|
|
|
* `buildTrunkPackage` will now correctly honor `buildPhaseCargoCommand` if
|
|
|
|
specified (previously the value of `buildPhaseCommand` was incorrectly being
|
|
|
|
used)
|
2024-11-08 21:36:43 +03:00
|
|
|
* `removeReferencesToVendoredSourcesHook` avoids referencing `/dev/fd`
|
|
|
|
directly since it may not be present on certain platforms
|
2024-11-08 21:25:05 +03:00
|
|
|
|
2024-10-13 02:35:44 +03:00
|
|
|
## [0.19.1] - 2024-10-12
|
|
|
|
|
2024-10-13 01:08:18 +03:00
|
|
|
### Added
|
|
|
|
|
|
|
|
* `cargoDocTest` is now available as an alternative to `cargoTest` which runs
|
|
|
|
only doc tests.
|
|
|
|
|
2024-10-13 02:28:15 +03:00
|
|
|
### Changed
|
|
|
|
|
|
|
|
* `buildDepsOnly` now sets `CRANE_BUILD_DEPS_ONLY` as an environment variable
|
|
|
|
when it runs. Build hooks can use this as a shortcut to determine whether
|
|
|
|
running inside of a `buildDepsOnly` derivation in case they need to tailor
|
|
|
|
their behavior accordingly.
|
|
|
|
|
2024-10-08 02:39:36 +03:00
|
|
|
### Fixed
|
|
|
|
* Vendoring dependencies avoids creating malformed TOML configurations in
|
|
|
|
situations where registry name/url definitions cannot be found. When this
|
|
|
|
happens a warning will be printed out during evaluation to highlight the
|
|
|
|
issue.
|
|
|
|
|
2024-09-26 05:11:45 +03:00
|
|
|
## [0.19.0] - 2024-09-25
|
|
|
|
|
2024-08-31 20:27:30 +03:00
|
|
|
### Added
|
|
|
|
* `taploFmt` is now available for checking TOML formatting
|
|
|
|
|
2024-08-23 02:24:53 +03:00
|
|
|
### Changed
|
|
|
|
* **Breaking** (technically): `buildPackage` no longer adds `jq` to
|
|
|
|
`nativeBuildInputs` as doing so can result in rebuilding any `*-sys` crates
|
|
|
|
which rely on `PKG_CONFIG_PATH` remaining stable
|
2024-08-30 01:47:52 +03:00
|
|
|
* **Breaking**: `downloadCargoPackageFromGit` now takes `hash` instead of
|
|
|
|
`sha256` when specifying an output hash for the download
|
2024-08-23 02:24:53 +03:00
|
|
|
* `installFromCargoBuildLogHook` no longer assumes or requires that `jq` is
|
|
|
|
available on `$PATH` and will instead directly reference `pkgs.jq`
|
2024-08-30 01:35:39 +03:00
|
|
|
* `downloadCargoPackageFromGit` will now set `fetchLFS = true` when fetching git
|
|
|
|
repos with defined output hashes
|
2024-08-23 02:24:53 +03:00
|
|
|
|
2024-09-25 06:15:24 +03:00
|
|
|
### Fixed
|
|
|
|
* `cargoDoc` correctly honors `docInstallRoot` when specified
|
|
|
|
* `cargoDoc` falls back to installing from `./target/doc` even if
|
|
|
|
`$CARGO_BUILD_TARGET` is set but `./target/$CARGO_BUILD_TARGET/doc` does not
|
|
|
|
exist
|
|
|
|
|
2024-08-30 02:29:16 +03:00
|
|
|
### Removed
|
|
|
|
* The deprecated top-level (flake) attribute `lib` no longer exists. Please use
|
|
|
|
`mkLib` with an instance of `pkgs` instead.
|
|
|
|
|
2024-08-23 02:02:43 +03:00
|
|
|
## [0.18.1] - 2024-08-22
|
|
|
|
|
2024-08-05 01:10:51 +03:00
|
|
|
### Fixed
|
|
|
|
* Fixed vendoring dependencies from an alternative registry which they
|
|
|
|
themselves have dependencies on crates from _other_ registries.
|
2024-08-06 19:07:59 +03:00
|
|
|
* Fixed `cargoNextest`'s positioning of `cargoExtraArgs` to form a valid command
|
|
|
|
invocation when specified.
|
2024-08-05 01:10:51 +03:00
|
|
|
|
2024-07-06 03:41:47 +03:00
|
|
|
## [0.18.0] - 2024-07-05
|
|
|
|
|
2024-06-03 06:52:54 +03:00
|
|
|
### Changed
|
|
|
|
* **Breaking**: dropped compatibility for Nix versions below 2.18.2
|
|
|
|
* **Breaking**: dropped compatibility for nixpkgs-23.11.
|
2024-06-11 06:53:46 +03:00
|
|
|
* 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).
|
2024-06-29 21:29:52 +03:00
|
|
|
* `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)`
|
2024-06-03 06:52:54 +03:00
|
|
|
|
2024-06-09 04:15:24 +03:00
|
|
|
### 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
|
2024-06-11 06:53:46 +03:00
|
|
|
* `vendorCargoDeps` and `crateNameFromCargoToml` do their best to avoid IFD when
|
|
|
|
`src` is the result of `lib.cleanSourceWith` (and by extension
|
|
|
|
`cleanCargoSource`)
|
2024-06-15 20:55:13 +03:00
|
|
|
* `removeReferencesToVendoredSources` handles the edge case where
|
|
|
|
`cargoVendorDir` does not point to a path within the Nix store
|
2024-06-29 21:29:52 +03:00
|
|
|
* It is now possible to use `.overrideScope` to change what instance of
|
|
|
|
`craneUtils` will be used during vendoring.
|
2024-06-09 04:15:24 +03:00
|
|
|
|
2024-06-03 06:02:20 +03:00
|
|
|
## [0.17.3] - 2024-06-02
|
|
|
|
|
2024-05-30 02:24:23 +03:00
|
|
|
### Fixed
|
|
|
|
* `removeReferencesToVendoredSources` correctly signs aarch64-darwin builds
|
|
|
|
(which was accidentally broken in 0.17.2)
|
|
|
|
|
2024-05-26 20:49:12 +03:00
|
|
|
## [0.17.2] - 2024-05-26
|
|
|
|
|
2024-05-26 02:45:24 +03:00
|
|
|
### Fixed
|
2024-09-25 06:15:24 +03:00
|
|
|
* `removeReferencesToVendoredSources` has been optimized to search for source
|
2024-05-26 02:45:24 +03:00
|
|
|
references only once. For derivations which install many files, this phase can
|
|
|
|
run up to 99% faster than before.
|
2024-05-26 20:41:17 +03:00
|
|
|
* `cleanCargoToml` now cleans underscored versions of the same attributes (e.g.
|
|
|
|
`lib.proc-macro` and `lib.proc_macro`)
|
2024-05-26 02:45:24 +03:00
|
|
|
|
2024-05-20 01:00:51 +03:00
|
|
|
## [0.17.1] - 2024-05-19
|
|
|
|
|
2024-05-20 00:59:49 +03:00
|
|
|
### 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
|
|
|
|
|
2024-05-19 04:07:34 +03:00
|
|
|
## [0.17.0] - 2024-05-18
|
|
|
|
|
2024-05-04 20:49:24 +03:00
|
|
|
### 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
|
2024-05-04 22:36:42 +03:00
|
|
|
* `crateNameFromCargoToml` now supports selecting a derivation name by setting
|
|
|
|
`package.metadata.crane.name` or `workspace.metadata.crane.name` in the root
|
|
|
|
`Cargo.toml`
|
2024-05-19 02:39:46 +03:00
|
|
|
* `vendorCargoDeps`, `vendorCargoRegistries`, `vendorGitDeps`, and
|
|
|
|
`vendorMultipleCargoDeps` now support arbitrary overrides (i.e. patching) at
|
|
|
|
the individual crate/repo level when vendoring sources.
|
2024-05-04 20:49:24 +03:00
|
|
|
|
2024-05-04 20:20:06 +03:00
|
|
|
### 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)
|
2024-05-19 03:06:59 +03:00
|
|
|
* `buildTrunkPackage` now sets `env.TRUNK_SKIP_VERSION_CHECK = "true";` if not
|
|
|
|
specified
|
2024-05-04 20:20:06 +03:00
|
|
|
|
2024-05-04 22:36:42 +03:00
|
|
|
### 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.
|
2024-05-19 04:07:07 +03:00
|
|
|
* In the future, `crane.lib.${system}` will be removed. Please switch to using
|
|
|
|
`(crane.mkLib nixpkgs.lib.${system})` as an equivalent alternative.
|
2024-05-04 22:36:42 +03:00
|
|
|
|
2024-05-04 20:06:45 +03:00
|
|
|
## [0.16.6] - 2024-05-04
|
|
|
|
|
|
|
|
### Fixed
|
|
|
|
* Same as 0.16.5 but with the correct tag deployed to Flakestry/FlakeHub
|
|
|
|
|
2024-05-04 20:01:31 +03:00
|
|
|
## [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 https://github.com/ipetkov/crane/issues/527 and
|
|
|
|
https://github.com/toml-rs/toml/issues/691)
|
|
|
|
|
2024-04-07 21:11:57 +03:00
|
|
|
## [0.16.4] - 2024-04-07
|
|
|
|
|
2024-03-29 06:09:12 +03:00
|
|
|
### Added
|
|
|
|
* Added a warning if an unsupported version of nixpkgs is used
|
|
|
|
|
2024-03-23 01:39:45 +03:00
|
|
|
### 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;`
|
|
|
|
|
2024-03-29 06:09:12 +03:00
|
|
|
### Fixed
|
2024-03-23 02:32:09 +03:00
|
|
|
* `inheritCargoArtifactsHook` and `installCargoArtifactsHook` now correctly
|
|
|
|
handle the case when `CARGO_TARGET_DIR` is set to a nested directory
|
2024-04-07 20:45:14 +03:00
|
|
|
* Dependency vendoring now correctly takes unused patch dependencies into
|
|
|
|
account
|
2024-03-23 02:32:09 +03:00
|
|
|
|
2024-03-20 01:17:23 +03:00
|
|
|
## [0.16.3] - 2024-03-19
|
|
|
|
|
2024-03-20 00:55:28 +03:00
|
|
|
### Changed
|
|
|
|
* Sources are now fetched [crates.io's
|
|
|
|
CDN](https://blog.rust-lang.org/2024/03/11/crates-io-download-changes.html),
|
|
|
|
following cargo's (new) default behavior.
|
|
|
|
|
2024-03-29 06:09:12 +03:00
|
|
|
### Fixed
|
2024-03-05 06:53:19 +03:00
|
|
|
* `vendorMultipleCargoDeps` correctly lists `registries` as an optional
|
|
|
|
parameter
|
|
|
|
|
2024-02-22 03:01:51 +03:00
|
|
|
## [0.16.2] - 2024-02-21
|
|
|
|
|
2024-02-08 06:34:33 +03:00
|
|
|
### 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`
|
|
|
|
|
2024-02-22 03:00:58 +03:00
|
|
|
### 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 }`)
|
|
|
|
|
2024-01-28 23:21:37 +03:00
|
|
|
## [0.16.1] - 2024-01-28
|
|
|
|
|
2024-01-27 20:52:30 +03:00
|
|
|
### Changed
|
|
|
|
* `buildDepsOnly` now ignores any outputs (besides the default `out`)
|
|
|
|
|
2024-01-27 05:36:30 +03:00
|
|
|
### Fixed
|
2024-01-28 22:08:44 +03:00
|
|
|
* `buildDepsOnly` no longer fails when workspace is configured with
|
|
|
|
`#[deny(unused-extern-crates)]`
|
|
|
|
* `vendorCargoDeps` (and friends) are now much more friendly to
|
|
|
|
cross-compilation definitions. Specifically, source vendoring will always
|
|
|
|
build dependencies to run on the build machine (and not for the host we're
|
|
|
|
cross compiling to).
|
2024-01-27 05:36:30 +03:00
|
|
|
|
2024-01-19 03:55:27 +03:00
|
|
|
## [0.16.0] - 2024-01-18
|
|
|
|
|
2023-12-01 02:25:25 +03:00
|
|
|
### Changed
|
|
|
|
* **Breaking**: dropped compatibility for Nix versions below 2.18.1
|
|
|
|
* **Breaking**: dropped compatibility for nixpkgs-23.05.
|
2023-12-20 19:24:53 +03:00
|
|
|
* `buildTrunkPackage` has a new argument, `wasm-bindgen-cli` must be set
|
|
|
|
to avoid mismatching versions between the wasm-bindgen library and CLI tool.
|
2023-12-01 02:25:25 +03:00
|
|
|
|
2023-12-13 20:22:10 +03:00
|
|
|
### Fixed
|
|
|
|
* Workspace inheritance of `lints` in git dependencies is now correctly handled
|
|
|
|
|
2023-12-01 01:48:56 +03:00
|
|
|
## [0.15.1] - 2023-11-30
|
|
|
|
|
2023-11-30 03:43:47 +03:00
|
|
|
### Changed
|
|
|
|
* `buildDepsOnly` will now assume `cargoTestExtraArgs = "--no-run";` if not
|
|
|
|
specified (since there is no point to trying to run tests with the stripped
|
|
|
|
sources). To get the old behavior back, set `cargoTestExtraArgs = "";`
|
|
|
|
|
2023-11-26 21:28:14 +03:00
|
|
|
### Fixed
|
|
|
|
* `buildTrunkPackage`'s `preConfigure` script to fail quicker with a more
|
|
|
|
obvious error message if dependencies at not appropriately met
|
|
|
|
|
2023-11-05 23:48:30 +03:00
|
|
|
## [0.15.0] - 2023-11-05
|
|
|
|
|
2023-10-21 00:45:03 +03:00
|
|
|
### Added
|
|
|
|
* `cargoDeny` added for running [`cargo-deny`](https://github.com/EmbarkStudios/cargo-deny).
|
2023-11-05 23:34:43 +03:00
|
|
|
* `installCargoArtifactsHook` will now pass along the contents of
|
|
|
|
`$zstdCompressionExtraArgs` as arguments to `zstd` when compressing artifacts.
|
|
|
|
This allows for tailoring compression behavior, for example, by setting
|
|
|
|
`zstdCompressionExtraArgs = "-19";` on the derivation.
|
2023-10-21 00:45:03 +03:00
|
|
|
|
2023-10-18 05:30:35 +03:00
|
|
|
### Changed
|
|
|
|
* The `use-zstd` artifact installation mode now uses a chained, incremental
|
|
|
|
approach to avoid redundancy. Old behavior (taking a full snapshot of the
|
|
|
|
cargo artifacts) can be achieved by setting `doCompressAndInstallFullArchive =
|
|
|
|
true`.
|
2023-10-21 01:28:41 +03:00
|
|
|
* The default `installCargoArtifactsMode` has been changed to `use-zstd`,
|
|
|
|
meaning cargo artifacts will be compressed to a series of incremental, zstd
|
|
|
|
compressed tarballs across derivations. To get the old behavior back, set
|
|
|
|
`installCargoArtifactsMode = "use-symlink"` to any derivation which produces
|
|
|
|
cargo artifacts.
|
2023-10-19 03:57:24 +03:00
|
|
|
* All dependencies (outside of `nixpkgs`) have been dropped from the (main)
|
|
|
|
flake.lock file so they do not pollute downstream projects' lock files.
|
2023-10-18 05:30:35 +03:00
|
|
|
|
2023-11-05 21:32:24 +03:00
|
|
|
### Fixed
|
|
|
|
* `mkDummySrc` now properly handles file cleaning (and file including) when a
|
|
|
|
build is invoked with a `--store ...` override
|
|
|
|
|
2023-10-18 03:25:19 +03:00
|
|
|
## [0.14.3] - 2023-10-17
|
|
|
|
|
2023-10-17 03:12:57 +03:00
|
|
|
### Changed
|
|
|
|
* `craneUtils` will now be built with the `rustPlatform` provided by nixpkgs
|
|
|
|
instead of the currently configured toolchain. This should hopefully result in
|
|
|
|
fewer surprises for those testing with really old MSRV toolchains.
|
2023-10-17 03:24:15 +03:00
|
|
|
* `devShell` will now additionally include `clippy` and `rustfmt` from the
|
|
|
|
currently configured toolchain
|
2023-10-17 03:12:57 +03:00
|
|
|
|
2023-10-17 06:31:33 +03:00
|
|
|
### Fixed
|
|
|
|
* `replaceCargoLockHook` now runs as a `prePatch` hook (rather
|
|
|
|
than `postUnpack`) which correctly replaces the `Cargo.lock` in the source
|
|
|
|
directory rather than the parent directory
|
|
|
|
|
2023-10-15 23:22:47 +03:00
|
|
|
## [0.14.2] - 2023-10-15
|
|
|
|
|
2023-10-15 04:42:24 +03:00
|
|
|
### Added
|
|
|
|
* `replaceCargoLockHook` can now be used to easily replace or insert a
|
|
|
|
`Cargo.lock` file in the current derivation
|
|
|
|
|
2023-10-15 00:50:48 +03:00
|
|
|
### 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 = "";`.
|
|
|
|
|
2023-10-01 23:54:37 +03:00
|
|
|
### 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](https://github.com/ipetkov/crane/pull/407))
|
2023-10-04 05:00:30 +03:00
|
|
|
* Fixed handling of dummy target names to avoid issues with `cargo doc`.
|
|
|
|
([#410](https://github.com/ipetkov/crane/pull/410))
|
2023-10-15 22:08:32 +03:00
|
|
|
* When using `installCargoArtifactsMode = "use-zstd";` all files will be marked
|
|
|
|
as user-writable while compressing
|
2023-10-15 23:09:08 +03:00
|
|
|
* `removeReferencesToVendoredSources` now signs `aarch64-darwin` binaries. ([#418](https://github.com/ipetkov/crane/pull/418))
|
2023-10-01 23:54:37 +03:00
|
|
|
|
2023-09-24 02:24:05 +03:00
|
|
|
## [0.14.1] - 2023-09-23
|
|
|
|
|
2023-09-24 02:23:33 +03:00
|
|
|
### Fixed
|
|
|
|
|
|
|
|
* Fixed a bug where `buildPackage` would fail to inherit artifacts from
|
|
|
|
dependency crates if `cargoArtifacts` was not explicitly specified.
|
|
|
|
|
2023-09-22 08:08:45 +03:00
|
|
|
## [0.14.0] - 2023-09-21
|
|
|
|
|
2023-09-03 20:33:10 +03:00
|
|
|
### Added
|
|
|
|
* Added `devShell`, a thin wrapper around `pkgs.mkShell` which automatically
|
|
|
|
provides `cargo` and `rustc`.
|
2023-09-22 07:08:53 +03:00
|
|
|
* 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.
|
2023-09-03 20:33:10 +03:00
|
|
|
|
2023-08-27 22:17:58 +03:00
|
|
|
### 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 = "";`
|
2023-09-03 20:29:13 +03:00
|
|
|
* **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](https://github.com/ipetkov/crane/pull/376))
|
2023-09-04 03:33:25 +03:00
|
|
|
* Replaced various internal usages of `runCommandLocal` with `runCommand` for
|
|
|
|
more optimal behavior when downloading cached artifacts
|
2023-08-27 22:17:58 +03:00
|
|
|
|
2023-08-23 03:26:23 +03:00
|
|
|
## [0.13.1] - 2023-08-22
|
|
|
|
|
2023-08-11 03:38:14 +03:00
|
|
|
### Changed
|
|
|
|
* `buildTrunkPackage` will now use `dart-sass` instead of `nodePackages.sass`
|
2023-08-12 04:26:37 +03:00
|
|
|
* 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.
|
2023-08-11 03:38:14 +03:00
|
|
|
|
2023-08-07 18:46:02 +03:00
|
|
|
## [0.13.0] - 2023-08-07
|
2023-08-07 18:42:56 +03:00
|
|
|
|
2023-06-08 04:00:25 +03:00
|
|
|
### Added
|
|
|
|
* `buildPackage` now supports installing `dylib` targets
|
2023-06-13 05:03:18 +03:00
|
|
|
* Added support for sparse registries
|
2023-06-08 04:00:25 +03:00
|
|
|
|
|
|
|
### Changed
|
2023-07-08 02:28:38 +03:00
|
|
|
* **Breaking**: dropped compatibility for Nix versions below 2.13.3
|
|
|
|
* **Breaking**: dropped compatibility for nixpkgs-22.05. nixpkgs-23.05 and
|
2023-06-07 08:38:53 +03:00
|
|
|
* **Breaking** (technically): if `buildPackage` is called _without_ setting
|
|
|
|
`cargoArtifacts`, the default `buildDepsOnly` invocation will now stop running
|
|
|
|
any installation hooks
|
2023-06-19 02:41:59 +03:00
|
|
|
* **Breaking** (technically): `buildPackage` no longer installs cargo binary
|
|
|
|
dependencies (i.e. when the `bindeps` feature is used) by default
|
2023-06-20 00:50:17 +03:00
|
|
|
* `inheritCargoArtifactsHook` will now symlink dependency `.rlib` and `.rmeta`
|
|
|
|
files. This means that derivations which reuse existing cargo artifacts will
|
2023-06-21 04:13:46 +03:00
|
|
|
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
|
2023-06-30 02:51:22 +03:00
|
|
|
* Update `crane-utils` dependencies for successful build in nightly Rust (2023-06-28)
|
2022-02-17 07:53:23 +03:00
|
|
|
|
2023-08-07 18:46:02 +03:00
|
|
|
## [0.12.2] - 2023-06-06
|
2023-06-07 06:35:16 +03:00
|
|
|
|
2023-04-29 22:34:39 +03:00
|
|
|
### Added
|
|
|
|
* Added support for the [Trunk](https://trunkrs.dev) wasm app build tool
|
|
|
|
|
2023-05-19 07:03:02 +03:00
|
|
|
### Changed
|
|
|
|
* `resolver` key is no longer cleaned from Cargo.toml
|
|
|
|
|
2023-05-25 05:17:57 +03:00
|
|
|
### Fixed
|
|
|
|
* `buildTrunkPackage` will now strip references to store files by default
|
2023-06-07 06:54:50 +03:00
|
|
|
* `buildTrunkPackage` will now set the right `wasm-opt` version
|
2023-05-25 05:17:57 +03:00
|
|
|
|
2023-08-07 18:46:02 +03:00
|
|
|
## [0.12.1] - 2023-04-10
|
2023-04-11 04:16:16 +03:00
|
|
|
|
2023-04-11 04:37:58 +03:00
|
|
|
### Changed
|
|
|
|
* **Breaking**: When setting a default value for `cargoArtifacts`,
|
|
|
|
`buildPackage` will now ignore `installPhase` and `installPhaseCommand` when
|
|
|
|
calling `buildPackage`. To bring back the old behavior, please specify
|
|
|
|
`cargoArtifacts` explicitly
|
|
|
|
|
2023-04-02 20:57:17 +03:00
|
|
|
### 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.
|
|
|
|
|
2023-03-22 07:57:14 +03:00
|
|
|
### Fixed
|
|
|
|
* `vendorCargoDeps` correctly accepts arguments which have _not_ set `src`, so
|
|
|
|
long as one of `cargoLock`, `cargoLockContents`, or `cargoLockParsed` is set
|
|
|
|
|
2023-03-20 07:13:07 +03:00
|
|
|
## [0.12.0] - 2023-03-19
|
|
|
|
|
2023-03-07 04:24:21 +03:00
|
|
|
### Added
|
|
|
|
|
|
|
|
* Add a stubbed binary target to each "dummy" crate generated to support
|
|
|
|
["artifact dependencies" nightly feature](https://doc.rust-lang.org/cargo/reference/unstable.html#artifact-dependencies)
|
|
|
|
in case a crate is used as `bin` artifact dependency.
|
2023-03-20 02:44:14 +03:00
|
|
|
* Add `cargoLlvmCov` to run `cargo llvm-cov`
|
2023-03-20 03:33:17 +03:00
|
|
|
* Add `cargoLockParsed` option to `vendorCargoDeps` to support `Cargo.lock`
|
|
|
|
files parsed as nix attribute sets.
|
2023-03-20 06:57:15 +03:00
|
|
|
* `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.
|
2023-03-07 04:24:21 +03:00
|
|
|
|
2023-03-20 07:13:23 +03:00
|
|
|
### 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.
|
|
|
|
|
2023-02-20 01:46:28 +03:00
|
|
|
## [0.11.3] - 2023-02-19
|
|
|
|
|
2023-02-20 01:43:11 +03:00
|
|
|
### Fixed
|
|
|
|
* Fixed an unintentional cache invalidation whenever `buildDepsOnly` would run
|
|
|
|
on an unfiltered source (like `src = ./.;`).
|
|
|
|
|
2023-02-12 03:39:43 +03:00
|
|
|
### 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.
|
2023-02-19 20:46:57 +03:00
|
|
|
* A warning will now be emitted if `src` and `dummySrc` are passed to
|
|
|
|
`buildDepsOnly` as `dummySrc` will take priority
|
2023-02-12 03:39:43 +03:00
|
|
|
|
2023-02-12 02:46:00 +03:00
|
|
|
## [0.11.2] - 2023-02-11
|
|
|
|
|
2023-02-12 00:27:11 +03:00
|
|
|
### Fixed
|
|
|
|
* `buildPackage` is more tolerant of misbehaving proc macros which write to
|
|
|
|
stdout during the build
|
|
|
|
|
2023-01-22 03:50:49 +03:00
|
|
|
## [0.11.1] - 2023-01-21
|
|
|
|
|
2023-01-05 07:46:43 +03:00
|
|
|
### Changed
|
|
|
|
* Documented and made it easier to build a cargo workspace located in a
|
|
|
|
subdirectory of the source root
|
|
|
|
|
2023-01-04 05:53:38 +03:00
|
|
|
### Fixed
|
|
|
|
* Previously compiled build scripts now maintain their executable bit when
|
|
|
|
inherited
|
2023-01-22 03:46:32 +03:00
|
|
|
* Workspace inheritance in git dependencies is now correctly handled
|
2023-01-04 05:53:38 +03:00
|
|
|
|
2022-12-27 02:01:01 +03:00
|
|
|
## [0.11.0] - 2022-12-26
|
|
|
|
|
|
|
|
### Added
|
|
|
|
* Documentation is now available at [crane.dev](https://crane.dev)
|
|
|
|
|
2022-12-02 07:12:55 +03:00
|
|
|
### Changed
|
|
|
|
* **Breaking**: dropped compatibility for Nix versions below 2.11.0
|
|
|
|
* **Breaking**: dropped compatibility for nixpkgs-22.05. nixpkgs-22.11 and
|
|
|
|
nixpkgs-unstable are fully supported
|
2022-12-09 03:44:41 +03:00
|
|
|
* Zstd compression of cargo artifacts now defaults to using as many cores as
|
|
|
|
`$NIX_BUILD_CORES` allows for (or all available cores if it isn't defined)
|
2022-12-21 07:50:22 +03:00
|
|
|
* Dummy sources now attempt to use the same name as their original source (minus
|
|
|
|
the Nix store path and hash) to minimize errors with build scripts which
|
|
|
|
expect their full path to not change between runs
|
2022-12-02 07:12:55 +03:00
|
|
|
|
2022-12-02 04:08:20 +03:00
|
|
|
## [0.10.0] - 2022-12-01
|
|
|
|
|
2022-10-29 21:48:29 +03:00
|
|
|
### Added
|
|
|
|
* A new installation mode has been defined which symlinks identical cargo
|
|
|
|
artifacts against previously generated ones. This allows for linear space
|
|
|
|
usage in the Nix store across many chained derivations (as opposed to using a
|
|
|
|
zstd compressed tarball which uses quadratic space across many chained
|
|
|
|
derivations).
|
2022-11-28 06:23:35 +03:00
|
|
|
* `mkDummySrc` optionally accepts a `dummyrs` argument which allows for
|
|
|
|
customizing the contents of the dummy Rust files that will be generated.
|
2022-10-29 21:48:29 +03:00
|
|
|
|
|
|
|
### Changed
|
|
|
|
* **Breaking**: all cargo-based derivations will now default to using symlinking
|
|
|
|
their installed artifacts together instead of using zstd compressed tarballs.
|
|
|
|
To get the old behavior back, set `installCargoArtifactsMode = "use-zstd";` in
|
|
|
|
the derivation.
|
|
|
|
- Note that `buildPackage` will continue to use zstd compressed tarballs while
|
|
|
|
building dependencies (unless either of `cargoArtifacts` or
|
|
|
|
`installCargoArtifactsMode` is defined, in which case they will be honored)
|
2022-11-21 03:22:13 +03:00
|
|
|
* **Breaking**: the format for defining crate registries has been changed: each
|
|
|
|
registry URL should map to a set containing a `downloadUrl` attribute. This
|
|
|
|
set may also define `fetchurlExtraArgs` (another set) which will be forwarded
|
2022-11-28 06:23:35 +03:00
|
|
|
to the `fetchurl` invocations for crates for that registry.
|
|
|
|
* **Breaking** (technically): `buildDepsOnly` will now only default to running
|
|
|
|
`cargo check` with the `--all-targets` flag only if `doCheck = true;` is set on
|
|
|
|
the derivation (otherwise the flag is omitted). To get the previous behavior
|
|
|
|
back simply set `cargoCheckExtraArgs = "--all-targets";`.
|
2022-10-29 21:56:41 +03:00
|
|
|
* `registryFromGitIndex` now uses shallow checkouts for better performance
|
2022-11-21 03:22:13 +03:00
|
|
|
* `registryFromDownloadUrl` and `registryFromGitIndex` now allow specifying
|
|
|
|
`fetchurlExtraArgs` which will be forwarded to the `fetchurl` invocations for
|
|
|
|
crates for that registry
|
2022-10-29 21:48:29 +03:00
|
|
|
|
2022-11-10 05:12:34 +03:00
|
|
|
### Fixed
|
|
|
|
* Unpacking a git repository now ignores duplicate crates to match cargo's
|
|
|
|
behavior
|
2022-11-18 04:00:25 +03:00
|
|
|
* Sped up stripping references to source files
|
2022-11-21 04:12:39 +03:00
|
|
|
* Dummy sources now import the `core` crate more robustly (playing more nicely
|
|
|
|
with `cargo-hakari`)
|
2022-11-28 06:23:35 +03:00
|
|
|
* Building a crate's dependencies automatically works for uefi targets
|
2022-11-10 05:12:34 +03:00
|
|
|
|
2022-10-29 20:20:03 +03:00
|
|
|
## [0.9.0] - 2022-10-29
|
|
|
|
|
2022-10-10 00:16:29 +03:00
|
|
|
### Changed
|
|
|
|
* **Breaking**: all setup hooks have been removed from the `packages` flake
|
|
|
|
output. They can still be accessed via the `lib` flake output.
|
2022-10-10 01:17:25 +03:00
|
|
|
* **Breaking**: `cargoBuild` now only runs `cargo build` in a workspace, tests
|
|
|
|
are no longer run
|
2022-10-10 01:04:37 +03:00
|
|
|
* **Breaking**: `buildDepsOnly` does not automatically imply the `--all-targets`
|
|
|
|
flag when invoking `cargo check`. Use `cargoCheckExtraArgs` to control this
|
|
|
|
* `buildDepsOnly` now accepts `cargoCheckExtraArgs` for passing additional
|
|
|
|
arguments just to the `cargo check` invocation. By default `--all-targets`
|
|
|
|
will be used
|
|
|
|
* `buildDepsOnly` now accepts `cargoTestExtraArgs` for passing additional
|
|
|
|
arguments just to the `cargo test` invocation
|
2022-10-10 00:55:36 +03:00
|
|
|
* `buildPackage` now delegates to `mkCargoDerivation` instead of `cargoBuild`
|
2022-10-10 00:16:29 +03:00
|
|
|
|
2022-10-16 20:12:31 +03:00
|
|
|
### Fixed
|
|
|
|
* `crateNameFromCargoToml` now takes workspace inheritance into account. If a
|
|
|
|
crate does not specify `package.version` in its (root) Cargo.toml but does
|
|
|
|
specify `workspace.package.version` then the latter will be returned.
|
2022-10-19 05:13:38 +03:00
|
|
|
* Freestanding (`#![no_std]`) targets are now supported
|
2022-10-16 20:12:31 +03:00
|
|
|
|
2022-10-10 00:08:50 +03:00
|
|
|
## [0.8.0] - 2022-10-09
|
|
|
|
|
2022-10-10 00:00:17 +03:00
|
|
|
### Added
|
|
|
|
* `cargoTest` can now be used for only running the tests of a workspace
|
|
|
|
|
2022-10-09 05:03:05 +03:00
|
|
|
### Changed
|
|
|
|
* **Breaking** (technically): build hooks now expect helper tools (like `cargo`,
|
|
|
|
`jq`, `zstd`, etc.) to be present on the path instead of substituting a
|
|
|
|
reference to a (possibly different) executable in the store.
|
2022-10-09 21:24:44 +03:00
|
|
|
* `mkCargoDerivation` now automatically vendors dependencies if `cargoVendorDir`
|
|
|
|
is not defined
|
2022-10-09 21:35:26 +03:00
|
|
|
* `mkCargoDerivation` now automatically populates `pname` and `version` (via
|
|
|
|
`crateNameFromCargoToml`) if they are not specified
|
2022-10-09 21:42:10 +03:00
|
|
|
* `mkCargoDerivation` now defaults to an empty `checkPhaseCargoCommand` if not
|
|
|
|
specified
|
2022-10-09 21:53:55 +03:00
|
|
|
* `cargoAudit` now delegates to `mkCargoDerivation` instead of `cargoBuild`
|
2022-10-09 22:02:17 +03:00
|
|
|
* `cargoClippy` now delegates to `mkCargoDerivation` instead of `cargoBuild`
|
2022-10-09 21:48:53 +03:00
|
|
|
* `cargoDoc` now delegates to `mkCargoDerivation` instead of `cargoBuild`
|
2022-10-09 21:45:27 +03:00
|
|
|
* `cargoFmt` now delegates to `mkCargoDerivation` instead of `cargoBuild`
|
2022-10-09 22:12:51 +03:00
|
|
|
* `cargoNextest` now delegates to `mkCargoDerivation` instead of `cargoBuild`
|
2022-10-09 21:58:21 +03:00
|
|
|
* `cargoTarpaulin` now delegates to `mkCargoDerivation` instead of `cargoBuild`
|
2022-10-09 05:03:05 +03:00
|
|
|
|
|
|
|
### Fixed
|
|
|
|
* Installing binaries now uses the same version of cargo as was used to build
|
|
|
|
the package (instead of using whatever version is present in nixpkgs)
|
|
|
|
|
2022-10-09 20:28:48 +03:00
|
|
|
### Deprecated
|
|
|
|
* The `packages` flake output has been deprecated. All setup hooks can be
|
|
|
|
accessed via the `lib` flake output (or via the result of the `mkLib` flake
|
|
|
|
output)
|
|
|
|
|
2022-09-29 03:54:49 +03:00
|
|
|
## [0.7.0] - 2022-09-28
|
|
|
|
|
2022-09-20 04:05:43 +03:00
|
|
|
## Added
|
|
|
|
* `cargoDoc` can now be used for building the documentation of a workspace
|
2022-09-21 04:27:47 +03:00
|
|
|
* `cleanCargoSource` can now be used to filter sources to only include cargo and
|
|
|
|
Rust files (and avoid rebuilds when irrelevant files change).
|
|
|
|
`filterCargoSources` is the underlying filter implementation and can be
|
|
|
|
composed with other filters
|
2022-09-25 02:45:56 +03:00
|
|
|
* `removeReferencesToVendoredSourcesHook` defines a post-install hook which will
|
|
|
|
remove any references to vendored sources from any installed binaries. Useful
|
|
|
|
for preventing nix from considering the binaries as having a (runtime)
|
|
|
|
dependency on said sources
|
2022-09-20 04:05:43 +03:00
|
|
|
|
2022-09-15 20:20:48 +03:00
|
|
|
## Changed
|
2022-09-18 04:18:03 +03:00
|
|
|
* **Breaking**: `mkCargoDerivation` now includes a default `configurePhase`
|
|
|
|
which does nothing but run the `preConfigure` and `postConfigure` hooks. This
|
|
|
|
is done to avoid breaking builds by including puts happen to have setup-hooks
|
|
|
|
which try to claim the configure phase (such as `cmake`). To get the old
|
|
|
|
behavior back, set `configurePhase = null;` in the derivation.
|
2022-09-15 20:20:48 +03:00
|
|
|
* `mkCargoDerivation` (along with any of its callers like `cargoBuild`,
|
|
|
|
`buildPackage`, etc.) now accept a `stdenv` argument which will override the
|
|
|
|
default environment (coming from `pkgs.stdenv`) for that particular derivation
|
2022-09-27 09:25:09 +03:00
|
|
|
* `mkDummySrc` now accepts `extraScript` which can be used to run a custom
|
|
|
|
script, and therefore customize what the dummy source contains
|
|
|
|
* `buildDepsOnly` now accepts `dummySrc` as a way to directly pass in the dummy
|
|
|
|
source to be used. Automatically derived via `args.src` if not specified.
|
2022-09-15 20:20:48 +03:00
|
|
|
|
2022-09-15 03:44:40 +03:00
|
|
|
## Fixed
|
|
|
|
* `cargoAudit` properly keeps any `audit.toml` files when cleaning the source
|
2022-09-25 02:45:56 +03:00
|
|
|
* `buildPackage` now has more robust checks to ensure that all references to
|
|
|
|
vendored sources are removed after installation (which avoids consumers of the
|
|
|
|
final binaries having to download the sources as well)
|
2022-09-28 05:05:06 +03:00
|
|
|
* `mkDummySrc` how handles build scripts in a manner which ensures cargo runs
|
|
|
|
the real script later (instead of thinking it has not changed)
|
2022-09-15 03:44:40 +03:00
|
|
|
|
2022-09-08 06:47:33 +03:00
|
|
|
## [0.6.0] - 2022-09-07
|
|
|
|
|
2022-07-24 01:04:06 +03:00
|
|
|
### Added
|
|
|
|
* Added `cargoNextest` for running tests via [cargo-nextest](https://nexte.st/)
|
2022-07-30 18:52:07 +03:00
|
|
|
* Added `cargoAudit` for running [cargo-audit](https://crates.io/crates/cargo-audit)
|
|
|
|
with a provided advisory database instance.
|
2022-07-24 01:04:06 +03:00
|
|
|
|
2022-07-21 05:27:52 +03:00
|
|
|
### Changed
|
|
|
|
* **Breaking**: the `--workspace` flag is no longer set for all cargo commands
|
|
|
|
by default. The previous behavior can be recovered by setting `cargoExtraArgs
|
|
|
|
= "--workspace";` in any derivation.
|
2022-07-23 21:10:45 +03:00
|
|
|
* **Breaking**: the `$CARGO_PROFILE` environment variable can be used to specify
|
|
|
|
which cargo-profile all invocations use (by default `release` will be used).
|
|
|
|
Technically breaking if the default command was overridden for any derivation;
|
2022-07-24 00:11:53 +03:00
|
|
|
set `CARGO_PROFILE = "";` to avoid telling cargo to use a release build.
|
2022-07-23 21:10:45 +03:00
|
|
|
* **Breaking**: `cargoTarpaulin` will use the release profile by default
|
2022-08-12 02:58:32 +03:00
|
|
|
* **Breaking**: `cargoClippy`'s `cargoClippyExtraArgs` now default to
|
|
|
|
`"--all-targets"` instead of being specified as the cargo command itself. If
|
|
|
|
you have set `cargoClippyExtraArgs` to an explicit value and wish to retain
|
|
|
|
the previous behavior you should prepend `"--all-targets"` to it.
|
2022-08-28 04:44:07 +03:00
|
|
|
* **Breaking**: `remapSourcePathPrefixHook` and the `doRemapSourcePathPrefix`
|
|
|
|
option have been removed, and the behavior of `buildPackage` has been updated
|
|
|
|
to break false dependencies on the crate sources from the final binaries
|
|
|
|
(which was the old behavior of the `doRemapSourcePathPrefix` option). To
|
|
|
|
disable this behavior, set the `doNotRemoveReferencesToVendorDir` environment
|
|
|
|
variable to any non-empty string.
|
2022-07-23 20:04:55 +03:00
|
|
|
* All cargo invocations made during the build are automatically logged
|
2022-08-07 22:07:33 +03:00
|
|
|
* Vendoring git dependencies will throw a descriptive error message if a locked
|
|
|
|
revision is missing from `Cargo.lock` and a hint towards resolution
|
2022-07-21 05:27:52 +03:00
|
|
|
|
2022-08-13 02:48:53 +03:00
|
|
|
### Fixed
|
|
|
|
* **Breaking**: `vendorGitDeps` will only include crates referenced by the
|
|
|
|
`Cargo.lock` file, meaning any extraneous crates which happen to be present in
|
|
|
|
the git repository will be ignored.
|
|
|
|
|
2022-07-21 03:53:58 +03:00
|
|
|
## [0.5.1] - 2022-07-20
|
|
|
|
|
2022-06-26 21:25:40 +03:00
|
|
|
### Added
|
|
|
|
* Added `.overrideToolchain` as a convenience for using a custom rust toolchain
|
|
|
|
|
2022-06-30 06:55:25 +03:00
|
|
|
### Fixed
|
|
|
|
* Fixed an issue where `mkDummySrc` would produce incorrect results for filtered
|
|
|
|
sources: #46
|
|
|
|
|
2022-06-13 02:56:30 +03:00
|
|
|
## [0.5.0] - 2022-06-12
|
|
|
|
|
|
|
|
### Changed
|
2022-06-02 03:05:52 +03:00
|
|
|
* **Breaking**: dropped compatibility for Nix versions below 2.8.1
|
2022-06-02 03:09:29 +03:00
|
|
|
* **Breaking**: updated all flake attributes to follow the new `.default`
|
|
|
|
guidance as per Nix's warnings. Specifically:
|
|
|
|
* Crane's default overlay is now available at `.overlays.default` (previously
|
|
|
|
`.overlay`)
|
|
|
|
* All templates now use `{app,devShells,packages}.default` as well
|
2022-06-03 05:52:25 +03:00
|
|
|
* **Breaking**: `lib.fromTOML` and `lib.toTOML` have been removed in favor of
|
|
|
|
`builtins.fromTOML`
|
|
|
|
* Improved support for consuming `crane` without using flakes
|
|
|
|
* The `nix-std` dependency has been dropped
|
2022-06-02 03:05:52 +03:00
|
|
|
|
2022-05-30 02:10:00 +03:00
|
|
|
## [0.4.1] - 2022-05-29
|
|
|
|
|
2022-05-30 01:56:29 +03:00
|
|
|
### Fixed
|
|
|
|
* Dummy source derivations go to greater lengths to only depend on the files
|
|
|
|
they consume. Specifying the entire flake source as an input (e.g. via
|
|
|
|
`buildPackage { src = self; }`) now avoids rebuilding everything from scratch
|
|
|
|
whenever _any_ file is changed. #28
|
|
|
|
|
2022-05-11 03:28:31 +03:00
|
|
|
## [0.4.0] - 2022-05-10
|
|
|
|
|
2022-05-09 05:44:42 +03:00
|
|
|
### Changed
|
2022-05-11 03:28:31 +03:00
|
|
|
* **Breaking**: the previously named `utils` flake input has been renamed to
|
|
|
|
`flake-utils`
|
2022-05-09 05:44:42 +03:00
|
|
|
* `buildDepsOnly` now adds `--all-targets` to the default `cargo
|
|
|
|
check` invocation. This allows caching all artifacts (including from
|
|
|
|
dev-dependencies) such that tools like clippy don't have to generate them
|
|
|
|
every time they run.
|
2022-05-11 03:28:31 +03:00
|
|
|
* Templates now use the newer flake format accepted by Nix 2.8 (e.g.
|
|
|
|
`{packages,overlays,devShells}.default`, etc.)
|
|
|
|
|
|
|
|
### Fixed
|
|
|
|
* Fixed project and template flakes to avoid superfluous follows declaration for
|
|
|
|
`flake-utils`
|
|
|
|
* Fixed quoting of relative paths to allow building with external sources
|
2022-05-09 05:44:42 +03:00
|
|
|
|
2022-02-25 04:58:59 +03:00
|
|
|
## [0.3.3] - 2022-02-24
|
|
|
|
|
2022-02-21 01:20:21 +03:00
|
|
|
### Fixed
|
|
|
|
* Use `lib.groupBy` if `builtins.groupBy` isn't available (i.e. if a Nix version
|
|
|
|
earlier than 2.5 is used)
|
2022-02-25 04:58:59 +03:00
|
|
|
* The cross compilation example also hows how to set the `HOST_CC` environment
|
|
|
|
variable which may be required by some build scripts to function properly
|
2022-02-21 01:20:21 +03:00
|
|
|
|
2022-02-19 05:19:05 +03:00
|
|
|
## [0.3.2] - 2022-02-18
|
|
|
|
|
|
|
|
### Fixed
|
|
|
|
* Fixed handling git dependencies whose locked revision is not on the
|
|
|
|
repository's main branch
|
|
|
|
|
2022-02-18 05:16:34 +03:00
|
|
|
## [0.3.1] - 2022-02-17
|
|
|
|
|
2022-02-17 07:53:23 +03:00
|
|
|
### Added
|
|
|
|
* Added template and example for cross compiling to other platforms
|
|
|
|
* Added template and example for building static binaries using musl
|
|
|
|
|
|
|
|
### Changed
|
2022-02-13 20:49:03 +03:00
|
|
|
* `cargoClippy` and `cargoTarpaulin` will install cargo artifacts by default (or
|
|
|
|
install an empty `target` directory if there are none). This allows for more
|
|
|
|
easily chaining derivations if doing so is desired.
|
|
|
|
- This can be disabled by setting `doInstallCargoArtifacts = false;` in the
|
|
|
|
derivation
|
|
|
|
|
2022-02-17 07:53:23 +03:00
|
|
|
### Fixed
|
|
|
|
* Fixed an issue where cross compiling would try to needlessly cross compile
|
|
|
|
rustc and cargo themselves
|
|
|
|
|
2022-02-12 07:33:11 +03:00
|
|
|
## [0.3.0] - 2022-02-11
|
|
|
|
|
|
|
|
### Added
|
|
|
|
* `downloadCargoPackageFromGit` has been added to handle downloading and
|
|
|
|
unpacking a cargo workspace from a git repository
|
|
|
|
* `vendorCargoRegistries` has been added to handle vendoring crates from all
|
|
|
|
registries used in a `Cargo.lock` file
|
|
|
|
* `vendorGitDeps` has been added to handle vendoring crates from all git sources
|
|
|
|
used in a `Cargo.lock` file
|
|
|
|
|
|
|
|
### Changed
|
|
|
|
* `vendorCargoDeps` now automatically handles git dependencies by default
|
|
|
|
- Git dependencies will be vendored as another source in the output derivation
|
|
|
|
- The cargo configuration is done such that the sources are available to use
|
|
|
|
when it decides, without overriding that crate for the entire workspace
|
|
|
|
* For example, if your workspace contains a crate only used for testing
|
|
|
|
which has a git dependency of a crate used by other parts of the
|
|
|
|
workspace, then only that crate will use the git dependency. The rest of
|
|
|
|
the workspace will continue to use the crates.io version, just like cargo
|
|
|
|
behaves when used outside of Nix.
|
|
|
|
|
2022-02-12 06:33:17 +03:00
|
|
|
## [0.2.1] - 2022-02-11
|
|
|
|
### Changed
|
|
|
|
* `cargoFmt` will install cargo artifacts by default (or install an empty
|
|
|
|
`target` directory if there are none). This allows for more easily chaining
|
|
|
|
derivations if doing so is desired.
|
|
|
|
- This can be disabled by setting `doInstallCargoArtifacts = false;` in the
|
|
|
|
derivation
|
|
|
|
|
2022-01-31 03:26:55 +03:00
|
|
|
## [0.2.0] - 2022-01-30
|
|
|
|
|
|
|
|
### Added
|
|
|
|
* Support for alternative cargo registries
|
|
|
|
|
|
|
|
### Changed
|
|
|
|
* `urlForCargoPackage` now takes configured registries into account when
|
|
|
|
downloading crate sources
|
|
|
|
* **Breaking**: `vendorCargoDeps` now vendors each unique registry as a subdirectory within
|
|
|
|
the derivation's output. A `config.toml` file is also placed at the output
|
|
|
|
root which contains the necessary configurations to point cargo at the
|
|
|
|
vendored sources.
|
|
|
|
* `configureCargoVendoredDepsHook` is now aware of the updated `vendorCargoDeps`
|
|
|
|
output format, and will use the `config.toml` file it generates if it is
|
|
|
|
present. Otherwise it will fall back to the previous behavior (which is treat
|
|
|
|
the entire directory as only vendoring crates.io).
|
|
|
|
* Source vendoring now uses `runCommandLocal` (instead of `runCommand`) to
|
|
|
|
reduce network pressure in trying to fetch results which can quickly be built
|
|
|
|
locally
|
|
|
|
* Searching for `Cargo.toml` or `.cargo/config.toml` files is now done more
|
|
|
|
efficiently
|
|
|
|
|
|
|
|
## 0.1.0 - 2022-01-22
|
|
|
|
- First release
|
|
|
|
|
2024-11-19 01:39:07 +03:00
|
|
|
[0.19.2]: https://github.com/ipetkov/crane/compare/v0.19.1...v1.19.2
|
2024-10-13 02:35:44 +03:00
|
|
|
[0.19.1]: https://github.com/ipetkov/crane/compare/v0.19.0...v1.19.1
|
2024-09-26 05:11:45 +03:00
|
|
|
[0.19.0]: https://github.com/ipetkov/crane/compare/v0.18.1...v1.19.0
|
2024-08-23 02:02:43 +03:00
|
|
|
[0.18.1]: https://github.com/ipetkov/crane/compare/v0.18.0...v1.18.1
|
2024-07-06 03:41:47 +03:00
|
|
|
[0.18.0]: https://github.com/ipetkov/crane/compare/v0.17.3...v1.18.0
|
2024-06-03 06:02:20 +03:00
|
|
|
[0.17.3]: https://github.com/ipetkov/crane/compare/v0.17.2...v1.17.3
|
2024-05-26 20:49:12 +03:00
|
|
|
[0.17.2]: https://github.com/ipetkov/crane/compare/v0.17.1...v1.17.2
|
2024-05-20 01:00:51 +03:00
|
|
|
[0.17.1]: https://github.com/ipetkov/crane/compare/v0.17.0...v1.17.1
|
2024-05-19 04:07:34 +03:00
|
|
|
[0.17.0]: https://github.com/ipetkov/crane/compare/v0.16.6...v1.17.0
|
2024-05-04 20:07:24 +03:00
|
|
|
[0.16.6]: https://github.com/ipetkov/crane/compare/v0.16.5...v1.16.6
|
2024-05-04 20:01:31 +03:00
|
|
|
[0.16.5]: https://github.com/ipetkov/crane/compare/v0.16.4...v0.16.5
|
2024-04-07 21:11:57 +03:00
|
|
|
[0.16.4]: https://github.com/ipetkov/crane/compare/v0.16.3...v0.16.4
|
2024-03-20 01:17:23 +03:00
|
|
|
[0.16.3]: https://github.com/ipetkov/crane/compare/v0.16.2...v0.16.3
|
|
|
|
[0.16.2]: https://github.com/ipetkov/crane/compare/v0.16.1...v0.16.2
|
2024-01-28 23:21:37 +03:00
|
|
|
[0.16.1]: https://github.com/ipetkov/crane/compare/v0.16.0...v0.16.1
|
2024-01-19 03:55:27 +03:00
|
|
|
[0.16.0]: https://github.com/ipetkov/crane/compare/v0.15.1...v0.16.0
|
2023-12-01 01:48:56 +03:00
|
|
|
[0.15.1]: https://github.com/ipetkov/crane/compare/v0.15.0...v0.15.1
|
2023-11-05 23:48:30 +03:00
|
|
|
[0.15.0]: https://github.com/ipetkov/crane/compare/v0.14.3...v0.15.0
|
2023-10-18 03:25:19 +03:00
|
|
|
[0.14.3]: https://github.com/ipetkov/crane/compare/v0.14.2...v0.14.3
|
2023-10-15 23:22:47 +03:00
|
|
|
[0.14.2]: https://github.com/ipetkov/crane/compare/v0.14.1...v0.14.2
|
2023-09-24 02:24:05 +03:00
|
|
|
[0.14.1]: https://github.com/ipetkov/crane/compare/v0.14.0...v0.14.1
|
2023-09-22 08:08:45 +03:00
|
|
|
[0.14.0]: https://github.com/ipetkov/crane/compare/v0.13.1...v0.14.0
|
2023-08-23 03:26:23 +03:00
|
|
|
[0.13.1]: https://github.com/ipetkov/crane/compare/v0.13.0...v0.13.1
|
2023-08-07 18:42:56 +03:00
|
|
|
[0.13.0]: https://github.com/ipetkov/crane/compare/v0.12.2...v0.13.0
|
2023-06-07 06:35:16 +03:00
|
|
|
[0.12.2]: https://github.com/ipetkov/crane/compare/v0.12.1...v0.12.2
|
2023-04-11 04:16:16 +03:00
|
|
|
[0.12.1]: https://github.com/ipetkov/crane/compare/v0.12.0...v0.12.1
|
2023-03-20 07:13:07 +03:00
|
|
|
[0.12.0]: https://github.com/ipetkov/crane/compare/v0.11.3...v0.12.0
|
2023-02-20 01:46:28 +03:00
|
|
|
[0.11.3]: https://github.com/ipetkov/crane/compare/v0.11.2...v0.11.3
|
2023-02-12 02:46:00 +03:00
|
|
|
[0.11.2]: https://github.com/ipetkov/crane/compare/v0.11.1...v0.11.2
|
2023-01-22 03:50:49 +03:00
|
|
|
[0.11.1]: https://github.com/ipetkov/crane/compare/v0.11.0...v0.11.1
|
2022-12-27 02:01:01 +03:00
|
|
|
[0.11.0]: https://github.com/ipetkov/crane/compare/v0.10.0...v0.11.0
|
2022-12-02 04:08:20 +03:00
|
|
|
[0.10.0]: https://github.com/ipetkov/crane/compare/v0.9.0...v0.10.0
|
2022-10-29 20:20:03 +03:00
|
|
|
[0.9.0]: https://github.com/ipetkov/crane/compare/v0.8.0...v0.9.0
|
2022-10-10 00:08:50 +03:00
|
|
|
[0.8.0]: https://github.com/ipetkov/crane/compare/v0.7.0...v0.8.0
|
2022-09-29 03:54:49 +03:00
|
|
|
[0.7.0]: https://github.com/ipetkov/crane/compare/v0.6.0...v0.7.0
|
2022-09-08 06:47:33 +03:00
|
|
|
[0.6.0]: https://github.com/ipetkov/crane/compare/v0.5.1...v0.6.0
|
2022-07-21 03:53:58 +03:00
|
|
|
[0.5.1]: https://github.com/ipetkov/crane/compare/v0.5.0...v0.5.1
|
2022-06-13 02:56:30 +03:00
|
|
|
[0.5.0]: https://github.com/ipetkov/crane/compare/v0.4.1...v0.5.0
|
2022-05-30 02:10:00 +03:00
|
|
|
[0.4.1]: https://github.com/ipetkov/crane/compare/v0.4.0...v0.4.1
|
2022-05-11 03:28:31 +03:00
|
|
|
[0.4.0]: https://github.com/ipetkov/crane/compare/v0.3.3...v0.4.0
|
2022-02-25 04:58:59 +03:00
|
|
|
[0.3.3]: https://github.com/ipetkov/crane/compare/v0.3.2...v0.3.3
|
2022-02-19 05:19:05 +03:00
|
|
|
[0.3.2]: https://github.com/ipetkov/crane/compare/v0.3.1...v0.3.2
|
2022-02-18 05:16:34 +03:00
|
|
|
[0.3.1]: https://github.com/ipetkov/crane/compare/v0.3.0...v0.3.1
|
2022-02-12 07:33:11 +03:00
|
|
|
[0.3.0]: https://github.com/ipetkov/crane/compare/v0.2.1...v0.3.0
|
2022-02-12 06:33:17 +03:00
|
|
|
[0.2.1]: https://github.com/ipetkov/crane/compare/v0.2.0...v0.2.1
|
2022-01-31 03:26:55 +03:00
|
|
|
[0.2.0]: https://github.com/ipetkov/crane/compare/v0.1.0...v0.2.0
|