mirror of
https://github.com/nix-community/naersk
synced 2025-02-16 19:28:23 +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
|
, copyBuildArtifacts ? false
|
||||||
, doCheck ? true
|
, doCheck ? true
|
||||||
, doDoc ? true
|
, doDoc ? true
|
||||||
|
, copyDocsToSeparateOutput ? true
|
||||||
#| Whether to remove references to source code from the generated cargo docs
|
#| 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
|
# 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:
|
# 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" ];
|
preInstallPhases = lib.optional doDoc [ "docPhase" ];
|
||||||
|
|
||||||
CARGO_BUILD_PROFILE = if release then "release" else "debug";
|
CARGO_BUILD_PROFILE = if release then "release" else "debug";
|
||||||
|
@ -246,7 +247,7 @@ with rec
|
||||||
cp -r target $out
|
cp -r target $out
|
||||||
''}
|
''}
|
||||||
|
|
||||||
${lib.optionalString doDoc ''
|
${lib.optionalString (doDoc && copyDocsToSeparateOutput) ''
|
||||||
cp -r target/doc $doc
|
cp -r target/doc $doc
|
||||||
''}
|
''}
|
||||||
|
|
||||||
|
|
|
@ -162,6 +162,7 @@ with rec
|
||||||
{ cargoBuild = "source ${buildDepsScript}";
|
{ cargoBuild = "source ${buildDepsScript}";
|
||||||
doCheck = false;
|
doCheck = false;
|
||||||
copyBuildArtifacts = true;
|
copyBuildArtifacts = true;
|
||||||
|
copyDocsToSeparateOutput = false;
|
||||||
cargolock = cargolock';
|
cargolock = cargolock';
|
||||||
cargotoml =
|
cargotoml =
|
||||||
{ package = { name = "dummy"; version = "0.0.0"; }; } //
|
{ package = { name = "dummy"; version = "0.0.0"; }; } //
|
||||||
|
|
Loading…
Add table
Reference in a new issue