zstd: use as many threads as we can when compressing (#183)

This commit is contained in:
Ivan Petkov 2022-12-09 00:44:41 +00:00 committed by GitHub
parent 2243fb9c87
commit 63f80ee278
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 3 additions and 1 deletions

View File

@ -10,6 +10,8 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.
* **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
* 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)
## [0.10.0] - 2022-12-01

View File

@ -14,7 +14,7 @@ compressAndInstallCargoArtifactsDir() {
--group=0 \
--numeric-owner \
--pax-option=exthdr.name=%d/PaxHeaders/%f,delete=atime,delete=ctime \
-c "${cargoTargetDir}" | zstd -o "${dest}"
-c "${cargoTargetDir}" | zstd "-T${NIX_BUILD_CORES:-0}" -o "${dest}"
)
}