Commit Graph

20 Commits

Author SHA1 Message Date
Ivan Petkov
f1c2fe6716
installCargoArtifactsHook: allow specifying additional zstd args (#450) 2023-11-05 20:34:43 +00:00
Ivan Petkov
758ae44222
installCargoArtifactsHook: change default installation mode to use-zstd (#442) 2023-10-20 22:28:41 +00:00
Ivan Petkov
c97a0c0d83
feature: incremental zstd mode (#398)
---------

Co-authored-by: Dawid Ciężarkiewicz <dpc@dpc.pw>
2023-10-17 19:30:35 -07:00
Ivan Petkov
eb5034b6ee
replaceCargoLockHook: run as prePatchHook not postUnpack (#434) 2023-10-17 03:31:33 +00:00
simonzkl
47f84c5b60
removeReferencesToVendoredSources: sign aarch64-darwin binaries (#418)
---------

Co-authored-by: Simon Zlender <simonz@btcx.com>
Co-authored-by: Ivan Petkov <ivanppetkov@gmail.com>
2023-10-15 20:09:08 +00:00
Ivan Petkov
9d6bf09d32
chore: clean up some dead code 2023-10-15 11:38:35 -07:00
ISibboI
a8b2251989
Make cached cargo artifacts writable in buildPackage when using use-zstd (#413)
---------

Co-authored-by: Ivan Petkov <ivanppetkov@gmail.com>
2023-10-15 19:08:32 +00:00
Ivan Petkov
4dcf584de1
mkCargoDerivation: replace Cargo.lock with contents of cargoLock (#425)
* The vendoring helpers already accept a `cargoLock` override, so
  automatically linking it in the derivation (if set) makes it a bit
  easier without having the caller manually do the link themselves
2023-10-15 01:42:24 +00:00
Ivan Petkov
8b08e96c9a
inheritCargoArtifactsHook: fix doNotLinkInheritedArtifacts handling (#357)
* This ensures that when doNotLinkInheritedArtifacts is set, artifact
  symlinks are deeply resolved
2023-07-07 23:28:38 +00:00
Ivan Petkov
116b32c30b
inheritCargoArtifactsHook: allow disabling symlink behavior (#345) 2023-06-21 01:13:46 +00:00
Ivan Petkov
bd65e0e473
inheritCargoArtifactsHook: symlink dependency rlib and rmeta files (#344)
* cargoTarpaulin: do not clean by default

---------

Co-authored-by: Philipp Mildenberger <philipp@mildenberger.me>
Co-authored-by: Philipp Mildenberger <philipp.mildenberger@artfabrik.at>
2023-06-19 21:50:17 +00:00
Roman Volosatovs
9f6e7286c5
fix: do not install bindep artifacts by default (#298)
- Add support for installing crates utilizing `bindeps` feature
by only installing binaries of workspace packages

---------

Signed-off-by: Roman Volosatovs <rvolosatovs@riseup.net>
Co-authored-by: Ivan Petkov <ivanppetkov@gmail.com>
2023-06-18 23:41:59 +00:00
Ivan Petkov
057d95721e
Add support for installing dylib crate types (#340)
---------

Signed-off-by: Roman Volosatovs <rvolosatovs@riseup.net>
Co-authored-by: Roman Volosatovs <rvolosatovs@riseup.net>
2023-06-08 01:00:25 +00:00
figsoda
475de74fa2
feat: add cargoLlvmCov (#267)
* feat: add cargoLlvmCov
* cargoHelperFunctionsHook: prefer `--release` over `--profile release`
Some tools (e.g. cargo-llvm-cov) don't understand `--profile release` as
an alias for `--release`, so `cargoWithProfile` should prefer passing
`--release` when `$CARGO_PROFILE` == "release"

---------

Co-authored-by: Ivan Petkov <ivanppetkov@gmail.com>
2023-03-19 23:44:14 +00:00
Felix Schröter
2b866abbdd
ignore non-json lines in cargoBuildLog (#234)
Fixes issues with non-json values in cargoBuildLog: rust-lang/cargo#8179
---------

Co-authored-by: Ivan Petkov <ivanppetkov@gmail.com>
2023-02-11 13:27:11 -08:00
Ivan Petkov
18ef99b1e0
inheritCargoArtifactsHook: preserve executable bit of build scripts (#206)
Using `cp --no-preserve mode` ends up losing the executable bit of
previously compiled build scripts. Instead we should ignore the file
ownership, and subsequently make the files writable (since the store is
read only)
2023-01-04 02:53:38 +00:00
Ivan Petkov
63f80ee278
zstd: use as many threads as we can when compressing (#183) 2022-12-09 00:44:41 +00:00
Ivan Petkov
c3935e06ca
removeReferencesToVendoredSourcesHook: use a single sed invocation (#167)
* Turns out it is much faster to build up one big regex of the
  references to remove and invoking `sed` just once than it is to invoke
  it once per reference
2022-11-17 17:00:25 -08:00
Ivan Petkov
975bda728a
Change default cargo artifact installation to use symlinks where possible (#150)
* Define a new installation mode which symlinks identical artifacts
  against a directory of 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)
* This new installation mode is the new default for all cargo based
  builds. The previous behavior is still available by setting
  `installCargoArtifactsMode = "use-zstd";` on a derivation
* `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-10-29 18:48:29 +00:00
Ivan Petkov
0017a8da68
flake: deprecate the packages flake output (#130)
Even though the setup hooks can be thought of as "packages", it makes
things much more simple to access everything from the same place
2022-10-09 10:28:48 -07:00