lol
0
fork

Configure Feed

Select the types of activity you want to include in your feed.

python312Packages.pybind11-protobuf: 0-unstable-2024-11-01 -> 0-unstable-2025-02-10

Co-authored-by: Someone Serge <else@someonex.net>

+106 -18
+78
pkgs/development/python-modules/pybind11-protobuf/add-install-target-for-cmake-builds.patch
··· 1 + diff --git a/CMakeLists.txt b/CMakeLists.txt 2 + index 4ec0f64..48b619a 100644 3 + --- a/CMakeLists.txt 4 + +++ b/CMakeLists.txt 5 + @@ -39,3 +39,54 @@ add_subdirectory(cmake/dependencies dependencies) 6 + set(TOP_LEVEL_DIR ${CMAKE_CURRENT_LIST_DIR}) 7 + include_directories(${TOP_LEVEL_DIR} ${pybind11_INCLUDE_DIRS}) 8 + add_subdirectory(pybind11_protobuf) 9 + + 10 + +# ============================================================================ 11 + + 12 + +# pybind11_protobuf CMake Config module 13 + +include(CMakePackageConfigHelpers) 14 + +configure_package_config_file( 15 + + ${CMAKE_CURRENT_SOURCE_DIR}/cmake/Config.cmake.in 16 + + "${CMAKE_CURRENT_BINARY_DIR}/pybind11_protobuf-config.cmake" 17 + + INSTALL_DESTINATION ${CMAKE_INSTALL_LIBDIR}/cmake/pybind11_protobuf 18 + + NO_CHECK_REQUIRED_COMPONENTS_MACRO) 19 + +install(FILES "${CMAKE_CURRENT_BINARY_DIR}/pybind11_protobuf-config.cmake" 20 + + DESTINATION ${CMAKE_INSTALL_LIBDIR}/cmake/pybind11_protobuf) 21 + + 22 + +# ============================================================================ 23 + + 24 + +add_library(pybind11_protobuf::native ALIAS pybind11_native_proto_caster) 25 + + 26 + +install( 27 + + TARGETS pybind11_native_proto_caster 28 + + EXPORT pybind11_protobuf_native_targets 29 + + DESTINATION ${CMAKE_INSTALL_LIBDIR} 30 + + INCLUDES 31 + + DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/pybind11_protobuf) 32 + +install( 33 + + FILES pybind11_protobuf/native_proto_caster.h 34 + + pybind11_protobuf/check_unknown_fields.h 35 + + pybind11_protobuf/enum_type_caster.h 36 + + pybind11_protobuf/proto_caster_impl.h 37 + + pybind11_protobuf/proto_cast_util.h 38 + + DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/pybind11_protobuf) 39 + +install( 40 + + EXPORT pybind11_protobuf_native_targets 41 + + FILE pybind11_protobuf_native-targets.cmake 42 + + NAMESPACE pybind11_protobuf:: 43 + + DESTINATION ${CMAKE_INSTALL_LIBDIR}/cmake/pybind11_protobuf) 44 + + 45 + +add_library(pybind11_protobuf::wrapped ALIAS pybind11_wrapped_proto_caster) 46 + + 47 + +install( 48 + + TARGETS pybind11_wrapped_proto_caster 49 + + EXPORT pybind11_protobuf_wrapped_targets 50 + + DESTINATION ${CMAKE_INSTALL_LIBDIR} 51 + + INCLUDES 52 + + DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/pybind11_protobuf) 53 + +install(FILES pybind11_protobuf/wrapped_proto_caster.h 54 + + DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/pybind11_protobuf) 55 + +install( 56 + + EXPORT pybind11_protobuf_wrapped_targets 57 + + FILE pybind11_protobuf_wrapped-targets.cmake 58 + + NAMESPACE pybind11_protobuf:: 59 + + DESTINATION ${CMAKE_INSTALL_LIBDIR}/cmake/pybind11_protobuf) 60 + diff --git a/cmake/Config.cmake.in b/cmake/Config.cmake.in 61 + new file mode 100644 62 + index 0000000..00dae69 63 + --- /dev/null 64 + +++ b/cmake/Config.cmake.in 65 + @@ -0,0 +1,13 @@ 66 + +@PACKAGE_INIT@ 67 + + 68 + +set(_pybind11_protobuf_supported_components native wrapped) 69 + + 70 + +foreach(_comp ${pybind11_protobuf_FIND_COMPONENTS}) 71 + + if(NOT _comp IN_LIST _pybind11_protobuf_supported_components) 72 + + set(pybind11_protobuf_FOUND False) 73 + + set(pybind11_protobuf_NOT_FOUND_MESSAGE "Unsupported component: ${_comp}") 74 + + endif() 75 + +endforeach() 76 + +foreach(_comp ${_pybind11_protobuf_supported_components}) 77 + + include("${CMAKE_CURRENT_LIST_DIR}/pybind11_protobuf_${_comp}-targets.cmake") 78 + +endforeach()
+28 -18
pkgs/development/python-modules/pybind11-protobuf/default.nix
··· 1 1 { 2 2 lib, 3 + stdenv, 3 4 buildPythonPackage, 4 5 fetchFromGitHub, 5 - fetchpatch, 6 6 cmake, 7 - abseil-cpp_202301, 8 - protobuf_23, 7 + abseil-cpp, 8 + protobuf, 9 9 pybind11, 10 + zlib, 10 11 }: 11 12 12 13 buildPythonPackage { 13 14 pname = "pybind11-protobuf"; 14 - version = "0-unstable-2024-11-01"; 15 + version = "0-unstable-2025-02-10"; 15 16 pyproject = false; 16 17 17 18 src = fetchFromGitHub { 18 19 owner = "pybind"; 19 20 repo = "pybind11_protobuf"; 20 - rev = "90b1a5b9de768340069c15b603d467c21cac5e0b"; 21 - hash = "sha256-3OuwRP9MhxmcfeDx+p74Fz6iLqi9FXbR3t3BtafesKk="; 21 + rev = "f02a2b7653bc50eb5119d125842a3870db95d251"; 22 + hash = "sha256-jlZcxQKYYYvTOGhk+0Sgtek4oKy6R1wDGiBOf2t+KiU="; 22 23 }; 23 24 24 25 patches = [ 25 - (fetchpatch { 26 - name = "0006-Add-install-target-for-CMake-builds.patch"; 27 - url = "https://build.opensuse.org/public/source/openSUSE:Factory/pybind11_protobuf/0006-Add-install-target-for-CMake-builds.patch?rev=2"; 28 - hash = "sha256-tjaOr6f+JCRft0SWd0Zfte7FEOYOP7RrW0Vjz34rX6I="; 29 - }) 30 - (fetchpatch { 31 - name = "0007-CMake-Use-Python-Module.patch"; 32 - url = "https://build.opensuse.org/public/source/openSUSE:Factory/pybind11_protobuf/0007-CMake-Use-Python-Module.patch?rev=2"; 33 - hash = "sha256-A1dhfh31FMBHBdCfoYmQrInZvO/DeuVMUL57PpUHYfA="; 34 - }) 26 + # Rebase of the OpenSUSE patch: https://build.opensuse.org/projects/openSUSE:Factory/packages/pybind11_protobuf/files/0006-Add-install-target-for-CMake-builds.patch?expand=1 27 + # on top of: https://github.com/pybind/pybind11_protobuf/pull/188/commits/5f0ac3d8c10cbb8b3b81063467c71085cd39624f 28 + ./add-install-target-for-cmake-builds.patch 35 29 ]; 36 30 37 31 nativeBuildInputs = [ cmake ]; 38 32 39 33 buildInputs = [ 40 - abseil-cpp_202301 41 - protobuf_23 34 + abseil-cpp 35 + protobuf 42 36 pybind11 37 + zlib 43 38 ]; 39 + 40 + cmakeFlags = 41 + [ 42 + (lib.cmakeBool "USE_SYSTEM_ABSEIL" true) 43 + (lib.cmakeBool "USE_SYSTEM_PROTOBUF" true) 44 + (lib.cmakeBool "USE_SYSTEM_PYBIND" true) 45 + 46 + # The find_package calls are local to the dependencies subdirectory 47 + (lib.cmakeBool "CMAKE_FIND_PACKAGE_TARGETS_GLOBAL" true) 48 + ] 49 + ++ lib.optionals stdenv.hostPlatform.isDarwin [ 50 + # Without it, Cmake prefers using Find-module which is mysteriously broken 51 + # But the generated Config works 52 + (lib.cmakeBool "CMAKE_FIND_PACKAGE_PREFER_CONFIG" true) 53 + ]; 44 54 45 55 meta = { 46 56 description = "Pybind11 bindings for Google's Protocol Buffers";