From 44c135489eeeee12d1c47b62ee4ad4d6c7332ddd Mon Sep 17 00:00:00 2001 From: Roland Conybeare Date: Sat, 10 May 2025 19:40:29 -0500 Subject: [PATCH] + xo-pyutil --- CMakeLists.txt | 2 +- default.nix | 2 +- pkgs/xo-pyutil.nix | 25 +++++++++++++++++++++++++ pkgs/xo-userenv.nix | 4 ++-- 4 files changed, 29 insertions(+), 4 deletions(-) create mode 100644 pkgs/xo-pyutil.nix diff --git a/CMakeLists.txt b/CMakeLists.txt index dc83426d..405b07bf 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -71,7 +71,7 @@ add_subdirectory(xo-subsys) add_subdirectory(xo-randomgen) add_subdirectory(xo-ordinaltree) add_subdirectory(xo-flatstring) -#add_subdirectory(xo-pyutil) +add_subdirectory(xo-pyutil) #add_subdirectory(xo-reflectutil) #add_subdirectory(xo-reflect) #add_subdirectory(xo-pyreflect) diff --git a/default.nix b/default.nix index 6e914f3d..e4f9cd64 100644 --- a/default.nix +++ b/default.nix @@ -44,7 +44,7 @@ let xo-randomgen = self.callPackage pkgs/xo-randomgen.nix {}; xo-ordinaltree = self.callPackage pkgs/xo-ordinaltree.nix {}; xo-flatstring = self.callPackage pkgs/xo-flatstring.nix {}; -# xo-pyutil = self.callPackage pkgs/xo-pyutil.nix {}; + xo-pyutil = self.callPackage pkgs/xo-pyutil.nix {}; # xo-reflectutil = self.callPackage pkgs/xo-reflectutil.nix {}; # xo-reflect = self.callPackage pkgs/xo-reflect.nix {}; # xo-pyreflect = self.callPackage pkgs/xo-pyreflect.nix {}; diff --git a/pkgs/xo-pyutil.nix b/pkgs/xo-pyutil.nix new file mode 100644 index 00000000..00076278 --- /dev/null +++ b/pkgs/xo-pyutil.nix @@ -0,0 +1,25 @@ +{ + # nixpkgs dependencies + stdenv, cmake, catch2, + + python3Packages, + + # xo dependencies + xo-cmake, xo-refcnt, +} : + +stdenv.mkDerivation (finalattrs: + { + name = "xo-pyutil"; + + src = ../xo-pyutil; + + cmakeFlags = ["-DCMAKE_MODULE_PATH=${xo-cmake}/share/cmake"]; + #doCheck = true; + nativeBuildInputs = [ cmake catch2 xo-cmake ]; + propagatedBuildInputs = [ + xo-refcnt + python3Packages.python + python3Packages.pybind11 + ]; + }) diff --git a/pkgs/xo-userenv.nix b/pkgs/xo-userenv.nix index 74f681ff..5c5a299e 100644 --- a/pkgs/xo-userenv.nix +++ b/pkgs/xo-userenv.nix @@ -29,11 +29,11 @@ xo-randomgen, xo-ordinaltree, xo-flatstring, + xo-pyutil, # xo-reflectutil, # xo-ratio, # xo-unit, # xo-pyunit, -# xo-pyutil, # xo-reflect, # xo-pyreflect, # xo-printjson, @@ -64,7 +64,7 @@ buildEnv { xo-randomgen xo-ordinaltree xo-flatstring -# xo-pyutil + xo-pyutil # xo-reflectutil # xo-reflect # xo-pyreflect