or-tools: Restore abseil-cpp and protobuf pins to fix build failure (#404701)

This commit is contained in:
Gaétan Lepage 2025-05-06 23:04:39 +02:00 committed by GitHub
commit 47bdd6af30
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -1,5 +1,5 @@
{ {
abseil-cpp, abseil-cpp_202407,
bzip2, bzip2,
cbc, cbc,
cmake, cmake,
@ -11,7 +11,7 @@
highs, highs,
lib, lib,
pkg-config, pkg-config,
protobuf, protobuf_29,
python3, python3,
re2, re2,
stdenv, stdenv,
@ -20,6 +20,17 @@
zlib, zlib,
}: }:
let
# OR-Tools strictly requires specific versions of abseil-cpp and
# protobuf. Do not un-pin these, even if you're upgrading them to
# what might happen to be the latest version at the current moment;
# future upgrades *will* break the build.
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 { inherit protobuf; };
in
stdenv.mkDerivation (finalAttrs: { stdenv.mkDerivation (finalAttrs: {
pname = "or-tools"; pname = "or-tools";
version = "9.12"; version = "9.12";
@ -104,7 +115,7 @@ stdenv.mkDerivation (finalAttrs: {
python3.pkgs.absl-py python3.pkgs.absl-py
python3.pkgs.pybind11 python3.pkgs.pybind11
python3.pkgs.pybind11-abseil python3.pkgs.pybind11-abseil
python3.pkgs.pybind11-protobuf pybind11-protobuf
python3.pkgs.pytest python3.pkgs.pytest
python3.pkgs.scipy python3.pkgs.scipy
python3.pkgs.setuptools python3.pkgs.setuptools
@ -116,7 +127,7 @@ stdenv.mkDerivation (finalAttrs: {
abseil-cpp abseil-cpp
highs highs
protobuf protobuf
python3.pkgs.protobuf python-protobuf
python3.pkgs.immutabledict python3.pkgs.immutabledict
python3.pkgs.numpy python3.pkgs.numpy
python3.pkgs.pandas python3.pkgs.pandas