Files
nixpkgs/pkgs/by-name/or/or-tools/pybind11-setup-hook.sh
Florian Klink 08ce3cc377 or-tools: 9.12 -> 9.14
Some of the patches we ship(ed) had to be regenerated.

or-tools now uses abseil-cpp_202505, and we need to ensure everything
uses that, to avoid another version of abseil leaking into the build.

pybind11 needs to be downgraded to 2.13.6 (I vendored the old nixpkgs
expression for that).
pybind11 also needs to be patched to fix math_opt's elemental python
binding.
or-tools ships this in their repo as a patch to their pybind11_bazel
dep, including a patch file there. I decided to pop one layer of
patching, and vendor the patch in here.

Upstream also patches their scipopts-scip dependency, renaming some
CMake targets, so we need to patch our dependency as well (and restore
find_package() discovery that broke).
2025-11-08 20:24:09 +02:00

13 lines
386 B
Bash

# Tell the pybind11 CMake module where to find host platform Python. This is
# required when cross-compiling.
pybind11CMakeFlags () {
cmakeFlagsArray+=(
'-DPYBIND11_PYTHONLIBS_OVERWRITE=OFF'
'-DPYTHON_EXECUTABLE=@pythonInterpreter@'
'-DPYTHON_INCLUDE_DIR=@pythonIncludeDir@'
'-DPYTHON_SITE_PACKAGES=@pythonSitePackages@'
)
}
preConfigureHooks+=(pybind11CMakeFlags)