Commit Graph

7 Commits

Author SHA1 Message Date
Ivan Petkov
64914fbc98
Remove doCompressTarget option
* Reducing the parameter surface area for good measure, zstd compression
  works pretty well and it seems redundant to support multiple ways of
  copying the target directory around
2021-12-30 20:25:33 -08:00
Ivan Petkov
2730271710
Make copyCargoTargetToOutputHook even more lazy
* Instead of always installing the hook but bailing early based on the
  configuration, we will instead only install the hook if the
  configuration requests it
2021-12-28 18:53:05 -08:00
Ivan Petkov
65b984b4aa
Rename doCopyTarget to doCopyTargetToOutput
* The intention is to make it more clear that this flag controls copying
  the target directory so that *other* derivations can use it, and DOES
  NOT control whether we use an *existing* target directory from another
  derivation
2021-12-28 15:19:10 -08:00
Ivan Petkov
b8d083cd7e
Implement automatically setting up a vendor dir from source
* If the source root contains a Cargo.lock file it will be used to
  create a vendor directory
* Otherwise a (descriptive) error will be thrown describing how to
  remediate
* The caller can, of course, manually specify their own `cargoVendorDir`
  which will skip the default vendoring
2021-12-28 15:15:10 -08:00
Ivan Petkov
5abd4f6054
Implement compressing cargo target directory 2021-12-26 20:25:36 -08:00
Ivan Petkov
edcb983805
Change doCopyTarget to always imply a separate output
* We can simplify the configuration by removing the
  `doCopyTargetToSeparateOutput` parameter
* If a caller wants to copy target artifacts into any other output, it
  is pretty trivial for them to add their own logic for it
2021-12-26 20:11:22 -08:00
Ivan Petkov
2d9788eb8b
Add copyCargoTargetToOutputHook 2021-12-26 18:06:19 -08:00