xo-umbrella2/pkgs/xo-interpreter.nix
Roland Conybeare 90bf4a8868
All checks were successful
cmake-docker / cmake-build (clang, clang++) (push) Successful in 24m15s
cmake-docker / cmake-build (gcc, g++) (push) Successful in 23m4s
CI / smoke-test (push) Successful in 35m57s
nix build: fix xo-interpreter <- xo-testutil [NIX]
2026-08-09 23:16:19 -04:00

55 lines
1.3 KiB
Nix

{
# nixpkgs dependencies
lib, stdenv, cmake, catch2, replxx, cli11,
# xo dependencies
xo-object,
xo-expression,
xo-reader,
xo-ppsink,
xo-testutil,
xo-indentlog2,
xo-subsys,
xo-cmake,
# config arguments
buildExamples ? true,
doCheck ? true
} :
stdenv.mkDerivation (finalattrs :
{
name = "xo-interpreter";
src = ../xo-interpreter;
# examples on by default: example/replxx/ is the only consumer of this
# subsystem, so it is the only end-to-end check that the installed
# package is usable. (Also how the xo-tokenizer example regression was
# caught -- see .xo-backlog/xo-imgui/issues/01.)
cmakeFlags = ["-DCMAKE_MODULE_PATH=${xo-cmake}/share/cmake"]
++ lib.optionals doCheck ["-DENABLE_TESTING=1"]
++ lib.optionals buildExamples ["-DXO_ENABLE_EXAMPLES=1"];
inherit doCheck;
nativeBuildInputs = [
cmake
xo-cmake
] ++ lib.optionals doCheck [
xo-testutil
catch2
cli11
];
propagatedBuildInputs = [
# replxx is PUBLIC on the library target (replxx::replxx appears in its
# INTERFACE_LINK_LIBRARIES), so it must be propagated, not native-only.
replxx
xo-object
xo-expression
xo-reader
xo-ppsink
xo-indentlog2
xo-subsys
];
})