mirror of
https://github.com/nix-community/naersk
synced 2024-11-22 19:53:05 +00:00
Merge pull request #13 from basvandijk/do-not-copyDocsToSeparateOutput-for-deps
Don't copy the docs to a separate doc output for the dependencies
This commit is contained in:
commit
5b148cf5ef
2 changed files with 4 additions and 2 deletions
|
@ -7,6 +7,7 @@ src:
|
|||
, copyBuildArtifacts ? false
|
||||
, doCheck ? true
|
||||
, doDoc ? true
|
||||
, copyDocsToSeparateOutput ? true
|
||||
#| Whether to remove references to source code from the generated cargo docs
|
||||
# to reduce Nix closure size. By default cargo doc includes snippets like the
|
||||
# following in the generated highlighted source code in files like: src/rand/lib.rs.html:
|
||||
|
@ -79,7 +80,7 @@ with rec
|
|||
};
|
||||
};
|
||||
|
||||
outputs = [ "out" ] ++ lib.optional doDoc "doc";
|
||||
outputs = [ "out" ] ++ lib.optional (doDoc && copyDocsToSeparateOutput) "doc";
|
||||
preInstallPhases = lib.optional doDoc [ "docPhase" ];
|
||||
|
||||
CARGO_BUILD_PROFILE = if release then "release" else "debug";
|
||||
|
@ -246,7 +247,7 @@ with rec
|
|||
cp -r target $out
|
||||
''}
|
||||
|
||||
${lib.optionalString doDoc ''
|
||||
${lib.optionalString (doDoc && copyDocsToSeparateOutput) ''
|
||||
cp -r target/doc $doc
|
||||
''}
|
||||
|
||||
|
|
|
@ -162,6 +162,7 @@ with rec
|
|||
{ cargoBuild = "source ${buildDepsScript}";
|
||||
doCheck = false;
|
||||
copyBuildArtifacts = true;
|
||||
copyDocsToSeparateOutput = false;
|
||||
cargolock = cargolock';
|
||||
cargotoml =
|
||||
{ package = { name = "dummy"; version = "0.0.0"; }; } //
|
||||
|
|
Loading…
Reference in a new issue