diff --git a/CMakeLists.txt b/CMakeLists.txt index e1cde265..0d68fff3 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -74,7 +74,7 @@ add_subdirectory(xo-flatstring) add_subdirectory(xo-pyutil) add_subdirectory(xo-reflectutil) add_subdirectory(xo-reflect) -#add_subdirectory(xo-pyreflect) +add_subdirectory(xo-pyreflect) #add_subdirectory(xo-ratio) #add_subdirectory(xo-unit) #add_subdirectory(xo-pyunit) diff --git a/default.nix b/default.nix index 2fcd82b6..18bc79d6 100644 --- a/default.nix +++ b/default.nix @@ -47,7 +47,7 @@ let 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 {}; + 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-pyunit = self.callPackage pkgs/xo-pyunit.nix {}; diff --git a/pkgs/xo-pyreflect.nix b/pkgs/xo-pyreflect.nix new file mode 100644 index 00000000..451d485b --- /dev/null +++ b/pkgs/xo-pyreflect.nix @@ -0,0 +1,51 @@ +{ + # nixpkgs dependencies + stdenv, cmake, catch2, # ... other deps here + + python3Packages, + + # xo dependencies + xo-cmake, xo-refcnt, xo-pyutil, xo-reflect, + + # args + + # attrset for fetching source code. + # { type, owner, repo, ref } + # + # e.g. type="github", owner="rconybea", repo="cmake-examples", ref="ex1b" + # + # see [[../flake.nix]] + # + #cmake-examples-ex1-path + + # someconfigurationoption ? false +} : + +stdenv.mkDerivation (finalattrs: + { + name = "xo-pyreflect"; + version = "1.0"; + + outputs = [ + "out" + ]; + + src = ../xo-pyreflect; + + cmakeFlags = ["-DCMAKE_MODULE_PATH=${xo-cmake}/share/cmake"]; + doCheck = true; + + propagatedBuildInputs = [ +# xo-refcnt + xo-pyutil + xo-reflect + ]; + + nativeBuildInputs = [ + cmake +# catch2 + xo-cmake + python3Packages.pybind11 + ]; + + }) diff --git a/pkgs/xo-userenv.nix b/pkgs/xo-userenv.nix index f6b1dba8..626a8d4d 100644 --- a/pkgs/xo-userenv.nix +++ b/pkgs/xo-userenv.nix @@ -32,10 +32,10 @@ xo-pyutil, xo-reflectutil, xo-reflect, + xo-pyreflect, # xo-ratio, # xo-unit, # xo-pyunit, -# xo-pyreflect, # xo-printjson, # xo-pyprintjson, # xo-callback, @@ -67,7 +67,7 @@ buildEnv { xo-pyutil xo-reflectutil xo-reflect -# xo-pyreflect + xo-pyreflect # xo-ratio # xo-unit # xo-pyunit