From ade4ea71379160d99e9fa65730502f1446d2b71b Mon Sep 17 00:00:00 2001 From: Ivan Petkov Date: Tue, 28 Dec 2021 18:51:44 -0800 Subject: [PATCH] Add some documentation around the buildWithCargo parameters --- lib/buildWithCargo.nix | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/lib/buildWithCargo.nix b/lib/buildWithCargo.nix index dee5cc2..3d05416 100644 --- a/lib/buildWithCargo.nix +++ b/lib/buildWithCargo.nix @@ -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" ]