nix build: xo-jit: build+install docs+examples: xo-jit.nix ++
This commit is contained in:
parent
d6dea12915
commit
d9b7ae2263
1 changed files with 32 additions and 7 deletions
|
|
@ -1,13 +1,17 @@
|
|||
{
|
||||
# dependencies
|
||||
stdenv, cmake, catch2,
|
||||
lib, stdenv, cmake, catch2,
|
||||
|
||||
clang, llvm,
|
||||
doxygen,
|
||||
|
||||
python3Packages,
|
||||
sphinx,
|
||||
|
||||
doxygen, sphinx, graphviz,
|
||||
|
||||
xo-cmake, xo-tokenizer, xo-expression,
|
||||
|
||||
buildDocs ? false,
|
||||
buildExamples ? false,
|
||||
} :
|
||||
|
||||
stdenv.mkDerivation (finalattrs:
|
||||
|
|
@ -19,8 +23,23 @@ stdenv.mkDerivation (finalattrs:
|
|||
|
||||
src = ../xo-jit;
|
||||
|
||||
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;
|
||||
|
||||
propagatedBuildInputs = [
|
||||
xo-expression
|
||||
];
|
||||
|
||||
postBuild = lib.optionalString buildDocs ''
|
||||
cmake --build . -- docs
|
||||
'';
|
||||
|
||||
nativeBuildInputs = [
|
||||
cmake
|
||||
catch2
|
||||
|
|
@ -30,8 +49,14 @@ stdenv.mkDerivation (finalattrs:
|
|||
sphinx
|
||||
xo-cmake
|
||||
xo-tokenizer
|
||||
] ++ lib.optionals buildDocs [
|
||||
doxygen
|
||||
sphinx
|
||||
graphviz
|
||||
python3Packages.sphinx-rtd-theme
|
||||
python3Packages.breathe
|
||||
python3Packages.sphinxcontrib-ditaa
|
||||
python3Packages.sphinxcontrib-plantuml
|
||||
];
|
||||
propagatedBuildInputs = [
|
||||
xo-expression
|
||||
];
|
||||
|
||||
})
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue