From 003d9f75c47842ea5c669cb219235d3fd5718eb2 Mon Sep 17 00:00:00 2001 From: Florian Klink Date: Tue, 21 Oct 2025 14:54:56 +0300 Subject: [PATCH] or-tools: move pybind11-protobuf package into or-tools or-tools is the only consumer of this library, and 1910563bb3c0a76aae035d578a8c094c5646baa7 is already one instance of the toplevel build being broken. Absorb pybind11-protobuf into or-tools, and manage the pinning there. It will also make it much easier to do the upcoming or-tools bump, which will also change these version bounds. pybind11-protobuf is not actually packaged in the version that or-tools asks for, but trying to use that version showed it wants abseil from 2023, which has been removed from nixpkgs. --- .../add-install-target-for-cmake-builds.patch | 0 pkgs/by-name/or/or-tools/package.nix | 10 +++++++--- .../or/or-tools/pybind11-protobuf.nix} | 2 +- pkgs/top-level/python-aliases.nix | 1 + pkgs/top-level/python-packages.nix | 2 -- 5 files changed, 9 insertions(+), 6 deletions(-) rename pkgs/{development/python-modules/pybind11-protobuf => by-name/or/or-tools}/add-install-target-for-cmake-builds.patch (100%) rename pkgs/{development/python-modules/pybind11-protobuf/default.nix => by-name/or/or-tools/pybind11-protobuf.nix} (95%) diff --git a/pkgs/development/python-modules/pybind11-protobuf/add-install-target-for-cmake-builds.patch b/pkgs/by-name/or/or-tools/add-install-target-for-cmake-builds.patch similarity index 100% rename from pkgs/development/python-modules/pybind11-protobuf/add-install-target-for-cmake-builds.patch rename to pkgs/by-name/or/or-tools/add-install-target-for-cmake-builds.patch diff --git a/pkgs/by-name/or/or-tools/package.nix b/pkgs/by-name/or/or-tools/package.nix index c8e9ba327ff1..da905c1f4a5d 100644 --- a/pkgs/by-name/or/or-tools/package.nix +++ b/pkgs/by-name/or/or-tools/package.nix @@ -1,4 +1,8 @@ { + stdenv, + lib, + callPackage, + abseil-cpp_202407, bzip2, cbc, @@ -11,12 +15,10 @@ gbenchmark, glpk, highs, - lib, pkg-config, protobuf_29, python3, re2, - stdenv, swig, unzip, zlib, @@ -33,7 +35,9 @@ let abseil-cpp = abseil-cpp_202407; protobuf = protobuf_29.override { inherit abseil-cpp; }; python-protobuf = python3.pkgs.protobuf5.override { inherit protobuf; }; - pybind11-protobuf = python3.pkgs.pybind11-protobuf.override { protobuf_29 = protobuf; }; + pybind11-protobuf = callPackage ./pybind11-protobuf.nix { + inherit (python3.pkgs) buildPythonPackage pybind11; + }; # local revert of 58daf511687f191829238fc7f571e08dc9dedf56, # working around https://github.com/google/or-tools/issues/4911 diff --git a/pkgs/development/python-modules/pybind11-protobuf/default.nix b/pkgs/by-name/or/or-tools/pybind11-protobuf.nix similarity index 95% rename from pkgs/development/python-modules/pybind11-protobuf/default.nix rename to pkgs/by-name/or/or-tools/pybind11-protobuf.nix index eb7c0aa0b072..b6074d995f32 100644 --- a/pkgs/development/python-modules/pybind11-protobuf/default.nix +++ b/pkgs/by-name/or/or-tools/pybind11-protobuf.nix @@ -4,7 +4,7 @@ buildPythonPackage, fetchFromGitHub, cmake, - abseil-cpp_202407, # downgrade, same reason as toplevel protobuf_29 + abseil-cpp_202407, protobuf_29, pybind11, zlib, diff --git a/pkgs/top-level/python-aliases.nix b/pkgs/top-level/python-aliases.nix index 7cf00fbaa665..860ccf50c2db 100644 --- a/pkgs/top-level/python-aliases.nix +++ b/pkgs/top-level/python-aliases.nix @@ -310,6 +310,7 @@ mapAliases { py-eth-sig-utils = throw "py-eth-sig-utils has been removed because it has been marked as broken since at least November 2024."; # Added 2025-10-04 py-scrypt = scrypt; # added 2025-08-07 py_stringmatching = throw "'py_stringmatching' has been renamed to/replaced by 'py-stringmatching'"; # Converted to throw 2025-10-29 + pybind11-protobuf = throw "'pybind11-protobuf' was only used by or-tools, and with some overrides, so vendored in there until it's used in other places."; # Converted to throw 2025-11-06 pycategories = throw "'pycategories' has been removed as it was broken and unmaintained"; # added 2025-11-08 PyChromecast = throw "'PyChromecast' has been renamed to/replaced by 'pychromecast'"; # Converted to throw 2025-10-29 pydns = throw "'pydns' has been renamed to/replaced by 'py3dns'"; # Converted to throw 2025-10-29 diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index 99e66e842b76..be47cdf5a250 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -12766,8 +12766,6 @@ self: super: with self; { pybind11-abseil = callPackage ../development/python-modules/pybind11-abseil { }; - pybind11-protobuf = callPackage ../development/python-modules/pybind11-protobuf { }; - pybind11-stubgen = callPackage ../development/python-modules/pybind11-stubgen { }; pybindgen = callPackage ../development/python-modules/pybindgen { };