From cb2ce5a5b82c99f5cb2dac42bcc408ba925c1064 Mon Sep 17 00:00:00 2001 From: Roland Conybeare Date: Sun, 11 May 2025 00:57:37 -0500 Subject: [PATCH] + xo-unit --- .github/workflows/main-stock-ubuntu.yml | 3 +++ CMakeLists.txt | 2 +- default.nix | 2 +- pkgs/xo-unit.nix | 28 +++++++++++++++++++++++++ pkgs/xo-userenv.nix | 4 ++-- 5 files changed, 35 insertions(+), 4 deletions(-) create mode 100644 pkgs/xo-unit.nix diff --git a/.github/workflows/main-stock-ubuntu.yml b/.github/workflows/main-stock-ubuntu.yml index 83f360fb..1f530a86 100644 --- a/.github/workflows/main-stock-ubuntu.yml +++ b/.github/workflows/main-stock-ubuntu.yml @@ -96,6 +96,9 @@ jobs: echo "::group::xo-ratio build" cmake --build .build -- xo-ratio + echo "::group::xo-unit build" + cmake --build .build -- xo-unit + echo "::group::xo build (catch all)" cmake --build .build #--verbose diff --git a/CMakeLists.txt b/CMakeLists.txt index ddabfff3..ced5d395 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -76,7 +76,7 @@ add_subdirectory(xo-reflectutil) add_subdirectory(xo-reflect) add_subdirectory(xo-pyreflect) add_subdirectory(xo-ratio) -#add_subdirectory(xo-unit) +add_subdirectory(xo-unit) #add_subdirectory(xo-pyunit) #add_subdirectory(xo-expression) #add_subdirectory(xo-pyexpression) diff --git a/default.nix b/default.nix index 32d3a6fc..78ac8b58 100644 --- a/default.nix +++ b/default.nix @@ -49,7 +49,7 @@ let xo-reflect = self.callPackage pkgs/xo-reflect.nix {}; xo-pyreflect = self.callPackage pkgs/xo-pyreflect.nix {}; xo-ratio = self.callPackage pkgs/xo-ratio.nix {}; -# xo-unit = self.callPackage pkgs/xo-unit.nix {}; + xo-unit = self.callPackage pkgs/xo-unit.nix {}; # xo-pyunit = self.callPackage pkgs/xo-pyunit.nix {}; # xo-expression = self.callPackage pkgs/xo-expression.nix {}; # xo-pyexpression = self.callPackage pkgs/xo-pyexpression.nix {}; diff --git a/pkgs/xo-unit.nix b/pkgs/xo-unit.nix new file mode 100644 index 00000000..aeb7798e --- /dev/null +++ b/pkgs/xo-unit.nix @@ -0,0 +1,28 @@ +{ + # dependencies + stdenv, cmake, catch2, doxygen, + + python3Packages, + sphinx, + + xo-cmake, xo-ratio, xo-flatstring, +} : + +stdenv.mkDerivation (finalattrs: + { + name = "xo-unit"; + version = "1.0"; + + src = ../xo-unit; + + cmakeFlags = ["-DCMAKE_MODULE_PATH=${xo-cmake}/share/cmake"]; + doCheck = true; + propagatedBuildInputs = [ xo-ratio xo-flatstring ]; + nativeBuildInputs = [ cmake + catch2 + doxygen + sphinx + xo-cmake + #python3Packages.sphinx-rtd-theme + ]; + }) diff --git a/pkgs/xo-userenv.nix b/pkgs/xo-userenv.nix index 102853f6..a8a0dbf1 100644 --- a/pkgs/xo-userenv.nix +++ b/pkgs/xo-userenv.nix @@ -34,7 +34,7 @@ xo-reflect, xo-pyreflect, xo-ratio, -# xo-unit, + xo-unit, # xo-pyunit, # xo-printjson, # xo-pyprintjson, @@ -69,7 +69,7 @@ buildEnv { xo-reflect xo-pyreflect xo-ratio -# xo-unit + xo-unit # xo-pyunit # xo-expression # xo-pyexpression