1{ 2 lib, 3 buildPythonPackage, 4 fetchFromGitHub, 5 fetchpatch, 6 cmake, 7 abseil-cpp, 8 pybind11, 9 python, 10}: 11 12buildPythonPackage rec { 13 pname = "pybind11-abseil"; 14 version = "202402.0"; 15 pyproject = false; 16 17 src = fetchFromGitHub { 18 owner = "pybind"; 19 repo = "pybind11_abseil"; 20 rev = "v${version}"; 21 hash = "sha256-hFVuGzEFqAEm2p2RmfhFtLB6qOqNuVNcwcLh8dIWi0k="; 22 }; 23 24 patches = [ 25 (fetchpatch { 26 name = "pybind11_abseil.patch"; 27 url = "https://build.opensuse.org/public/source/openSUSE:Factory/pybind11-abseil/pybind11_abseil.patch?rev=2"; 28 hash = "sha256-zwxCIhYMvexdSUmKM22OMBMEo0NRDgMtSVMDySFCn6U="; 29 }) 30 (fetchpatch { 31 name = "use-system-packages-if-possible.patch"; 32 url = "https://build.opensuse.org/public/source/openSUSE:Factory/pybind11-abseil/use-system-packages-if-possible.patch?rev=2"; 33 hash = "sha256-CLHOSni2ej6ICtvMtBoCIpR9CNPPibwIS+hYbOCAwBE="; 34 }) 35 (fetchpatch { 36 name = "0001-Install-headers-and-CMake-development-files.patch"; 37 url = "https://build.opensuse.org/public/source/openSUSE:Factory/pybind11-abseil/0001-Install-headers-and-CMake-development-files.patch?rev=2"; 38 hash = "sha256-TU9AzvF83aROY4gwys2ITOcdtjEm4x2IbhX4cHNWp0M="; 39 }) 40 ]; 41 42 nativeBuildInputs = [ cmake ]; 43 44 buildInputs = [ 45 abseil-cpp 46 pybind11 47 ]; 48 49 cmakeFlags = [ 50 (lib.cmakeFeature "CMAKE_INSTALL_PYDIR" "${placeholder "out"}/${python.sitePackages}") 51 (lib.cmakeFeature "Python_EXECUTABLE" python.interpreter) 52 ]; 53 54 meta = { 55 description = "Pybind11 bindings for the Abseil C++ Common Libraries"; 56 homepage = "https://github.com/pybind/pybind11_abseil"; 57 license = lib.licenses.bsd3; 58 maintainers = with lib.maintainers; [ wegank ]; 59 }; 60}