nix build: xo-expression: build+install docs + examples

This commit is contained in:
Roland Conybeare 2025-09-22 12:44:01 -04:00
commit 77d4f09851
2 changed files with 18 additions and 6 deletions

View file

@ -77,7 +77,6 @@ let
in
{
xo-expression = self.callPackage pkgs/xo-expression.nix {};
xo-tokenizer = self.callPackage pkgs/xo-tokenizer.nix { buildDocs = true; };
xo-reader = self.callPackage pkgs/xo-reader.nix {};
@ -130,6 +129,7 @@ let
xo-pykalmanfilter = self.callPackage pkgs/xo-pykalmanfilter.nix {};
#
xo-expression = self.callPackage pkgs/xo-expression.nix { buildExamples = true; };
xo-pyexpression = self.callPackage pkgs/xo-pyexpression.nix {};
xo-pyjit = self.callPackage pkgs/xo-pyjit.nix {};
#

View file

@ -1,8 +1,11 @@
{
# dependencies
stdenv, cmake, catch2,
lib, stdenv, cmake, catch2,
xo-cmake, xo-reflect,
xo-cmake, xo-reflect, xo-flatstring,
buildDocs ? false,
buildExamples ? false,
} :
stdenv.mkDerivation (finalattrs:
@ -12,10 +15,19 @@ stdenv.mkDerivation (finalattrs:
src = ../xo-expression;
cmakeFlags = ["-DCMAKE_MODULE_PATH=${xo-cmake}/share/cmake"];
cmakeFlags = ["-DCMAKE_MODULE_PATH=${xo-cmake}/share/cmake"]
++ lib.optionals buildExamples ["-DXO_ENABLE_EXAMPLES=on"];
inherit buildDocs;
inherit buildExamples;
doCheck = true;
propagatedBuildInputs = [ xo-reflect ];
nativeBuildInputs = [ cmake catch2
propagatedBuildInputs = [ xo-reflect
xo-flatstring
];
nativeBuildInputs = [ cmake
catch2
xo-cmake
];
})