Add some documentation around the buildWithCargo parameters

This commit is contained in:
Ivan Petkov 2021-12-28 18:51:44 -08:00
parent 6cc3ea3199
commit ade4ea7137
No known key found for this signature in database
GPG Key ID: BB6F9EFC065832B6

View File

@ -29,10 +29,22 @@ let
else null;
in
{ cargoArtifacts ? null
{
# A directory to an existing cargo `target` directory, which will be reused
# at the start of the derivation. Useful for caching incremental cargo builds
cargoArtifacts ? null
# A directory of vendored cargo sources which can be consumed without network
# access. Directory structure should basically follow the output of `cargo vendor`
, cargoVendorDir ? vendorCargoDepsFromArgs args
# Controls whether cargo's `target` directory should be compressed when copied
# to the output at the end of the derivation.
, doCompressTarget ? true
# Controls whether cargo's `target` directory should be copied as an output
, doCopyTargetToOutput ? true
# Controls instructing rustc to remap the path prefix of any sources it
# captures (for example, this can include file names in panic info). This is
# useful to omit any references to `/nix/store/...` from the final binary,
# as including them will make Nix pull in all sources when installing any binaries.
, doRemapSourcePathPrefix ? true
, nativeBuildInputs ? [ ]
, outputs ? [ "out" ]