xo-indentlog: build: XO_ENABLE_DOCS for docs build
This commit is contained in:
parent
366a7a5d11
commit
255f07c8c2
3 changed files with 162 additions and 122 deletions
|
|
@ -1,8 +1,15 @@
|
|||
{
|
||||
# dependencies
|
||||
stdenv, cmake, catch2,
|
||||
lib, stdenv, cmake, catch2,
|
||||
|
||||
python3Packages,
|
||||
|
||||
doxygen, sphinx, graphviz,
|
||||
|
||||
xo-cmake,
|
||||
|
||||
buildDocs ? false,
|
||||
buildExamples ? false,
|
||||
} :
|
||||
|
||||
stdenv.mkDerivation (finalattrs:
|
||||
|
|
@ -12,7 +19,29 @@ stdenv.mkDerivation (finalattrs:
|
|||
|
||||
src = ../xo-indentlog;
|
||||
|
||||
cmakeFlags = ["-DCMAKE_MODULE_PATH=${xo-cmake}/share/cmake"];
|
||||
cmakeFlags = ["-DCMAKE_MODULE_PATH=${xo-cmake}/share/cmake"]
|
||||
++ lib.optionals buildDocs ["-DXO_ENABLE_DOCS=on"]
|
||||
++ lib.optionals buildExamples ["-DXO_ENABLE_EXAMPLES=on"];
|
||||
|
||||
inherit buildDocs;
|
||||
inherit buildExamples;
|
||||
|
||||
doCheck = true;
|
||||
nativeBuildInputs = [ cmake catch2 xo-cmake ];
|
||||
|
||||
postBuild = lib.optionalString buildDocs ''
|
||||
cmake --build . -- docs
|
||||
'';
|
||||
|
||||
nativeBuildInputs = [ cmake
|
||||
catch2
|
||||
xo-cmake ]
|
||||
++ lib.optionals buildDocs [
|
||||
doxygen
|
||||
sphinx
|
||||
graphviz
|
||||
python3Packages.sphinx-rtd-theme
|
||||
python3Packages.breathe
|
||||
python3Packages.sphinxcontrib-ditaa
|
||||
python3Packages.sphinxcontrib-plantuml
|
||||
];
|
||||
})
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue