mirror of
https://github.com/ipetkov/crane.git
synced 2024-11-22 23:17:15 +03:00
cargoDoc: do not install cargo artifacts by default (#381)
* Also install generated docs
This commit is contained in:
parent
80432e1545
commit
ecf151658e
@ -14,7 +14,11 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.
|
||||
`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 = "";`
|
||||
* Fixed a bug when testing proc macro crates with `cargoNextest` on macO. ([#376](https://github.com/ipetkov/crane/pull/376))
|
||||
* **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))
|
||||
|
||||
## [0.13.1] - 2023-08-22
|
||||
|
||||
|
@ -431,6 +431,7 @@ Except where noted below, all derivation attributes are delegated to
|
||||
- `CARGO_PROFILE` can be set on the derivation to alter which cargo profile
|
||||
is selected; setting it to `""` will omit specifying a profile
|
||||
altogether.
|
||||
* `doInstallCargoArtifacts` will default to `false` if not specified
|
||||
* `pnameSuffix` will be set to `"-doc"`
|
||||
|
||||
#### Required attributes
|
||||
|
@ -15,4 +15,13 @@ mkCargoDerivation (args // {
|
||||
pnameSuffix = "-doc";
|
||||
|
||||
buildPhaseCargoCommand = "cargoWithProfile doc ${cargoExtraArgs} ${cargoDocExtraArgs}";
|
||||
|
||||
doInstallCargoArtifacts = args.doInstallCargoArtifacts or false;
|
||||
|
||||
# NB: cargo always places docs at the root of the target directory
|
||||
# even when building in release mode
|
||||
installPhaseCommand = ''
|
||||
mkdir -p $out/share
|
||||
mv "''${CARGO_TARGET_DIR:-target}/doc" $out/share
|
||||
'';
|
||||
})
|
||||
|
Loading…
Reference in New Issue
Block a user