python312Packages.pybind11-abseil: init at 202402.0

This commit is contained in:
Weijia Wang
2025-03-20 16:44:37 +01:00
parent c164eb0291
commit 15fd26619e
2 changed files with 62 additions and 0 deletions
@@ -0,0 +1,60 @@
{
lib,
buildPythonPackage,
fetchFromGitHub,
fetchpatch,
cmake,
abseil-cpp,
pybind11,
python,
}:
buildPythonPackage rec {
pname = "pybind11-abseil";
version = "202402.0";
pyproject = false;
src = fetchFromGitHub {
owner = "pybind";
repo = "pybind11_abseil";
rev = "v${version}";
hash = "sha256-hFVuGzEFqAEm2p2RmfhFtLB6qOqNuVNcwcLh8dIWi0k=";
};
patches = [
(fetchpatch {
name = "pybind11_abseil.patch";
url = "https://build.opensuse.org/public/source/openSUSE:Factory/pybind11-abseil/pybind11_abseil.patch?rev=2";
hash = "sha256-zwxCIhYMvexdSUmKM22OMBMEo0NRDgMtSVMDySFCn6U=";
})
(fetchpatch {
name = "use-system-packages-if-possible.patch";
url = "https://build.opensuse.org/public/source/openSUSE:Factory/pybind11-abseil/use-system-packages-if-possible.patch?rev=2";
hash = "sha256-CLHOSni2ej6ICtvMtBoCIpR9CNPPibwIS+hYbOCAwBE=";
})
(fetchpatch {
name = "0001-Install-headers-and-CMake-development-files.patch";
url = "https://build.opensuse.org/public/source/openSUSE:Factory/pybind11-abseil/0001-Install-headers-and-CMake-development-files.patch?rev=2";
hash = "sha256-TU9AzvF83aROY4gwys2ITOcdtjEm4x2IbhX4cHNWp0M=";
})
];
nativeBuildInputs = [ cmake ];
buildInputs = [
abseil-cpp
pybind11
];
cmakeFlags = [
(lib.cmakeFeature "CMAKE_INSTALL_PYDIR" "${placeholder "out"}/${python.sitePackages}")
(lib.cmakeFeature "Python_EXECUTABLE" python.interpreter)
];
meta = {
description = "Pybind11 bindings for the Abseil C++ Common Libraries";
homepage = "https://github.com/pybind/pybind11_abseil";
license = lib.licenses.bsd3;
maintainers = with lib.maintainers; [ wegank ];
};
}
+2
View File
@@ -11750,6 +11750,8 @@ self: super: with self; {
pybind11 = callPackage ../development/python-modules/pybind11 { };
pybind11-abseil = callPackage ../development/python-modules/pybind11-abseil { };
pybind11-stubgen = callPackage ../development/python-modules/pybind11-stubgen { };
pybindgen = callPackage ../development/python-modules/pybindgen { };