From 2455b2e3091d406e9902dc57a9b618860d66adef Mon Sep 17 00:00:00 2001 From: Orivej Desh Date: Fri, 4 Oct 2019 02:51:43 +0000 Subject: [PATCH] or-tools: 7.0 -> 7.3 --- .../libraries/science/math/or-tools/build.patch | 5 +++++ .../libraries/science/math/or-tools/default.nix | 11 ++++++++--- .../libraries/science/math/or-tools/protobuf.patch | 10 ++++++++++ 3 files changed, 23 insertions(+), 3 deletions(-) create mode 100644 pkgs/development/libraries/science/math/or-tools/build.patch create mode 100644 pkgs/development/libraries/science/math/or-tools/protobuf.patch diff --git a/pkgs/development/libraries/science/math/or-tools/build.patch b/pkgs/development/libraries/science/math/or-tools/build.patch new file mode 100644 index 00000000000..a67e137ff4a --- /dev/null +++ b/pkgs/development/libraries/science/math/or-tools/build.patch @@ -0,0 +1,5 @@ +--- a/makefiles/Makefile.python.mk ++++ b/makefiles/Makefile.python.mk +@@ -1070 +1070 @@ $(PYPI_ARCHIVE_TEMP_DIR)/ortools/ortools/data: $(PYDATA_LIBS) | $(PYPI_ARCHIVE_T +-$(PYPI_ARCHIVE_TEMP_DIR)/ortools/ortools/util: $(PYUTIL_LIBS) | $(PYPI_ARCHIVE_TEMP_DIR)/ortools/ortools ++$(PYPI_ARCHIVE_TEMP_DIR)/ortools/ortools/util: $(PYSORTED_INTERVAL_LIST_LIBS) | $(PYPI_ARCHIVE_TEMP_DIR)/ortools/ortools diff --git a/pkgs/development/libraries/science/math/or-tools/default.nix b/pkgs/development/libraries/science/math/or-tools/default.nix index c6e065320a2..224f4239a22 100644 --- a/pkgs/development/libraries/science/math/or-tools/default.nix +++ b/pkgs/development/libraries/science/math/or-tools/default.nix @@ -5,15 +5,20 @@ stdenv.mkDerivation rec { pname = "or-tools"; - version = "v7.0"; + version = "7.3"; src = fetchFromGitHub { owner = "google"; repo = "or-tools"; - rev = version; - sha256 = "09rs2j3w4ljw9qhhnsjlvfii297njjszwvkbgj1i6kns3wnlr7cp"; + rev = "v${version}"; + sha256 = "0q06vxmds6nm3dpjw4y5jzr8j98qgfb9i8pbm9pfhmqigv791hwc"; }; + patches = [ + ./build.patch # https://github.com/google/or-tools/pull/1619 + ./protobuf.patch # Otherwise it tries to install protobuf from pypi. + ]; + # The original build system uses cmake which does things like pull # in dependencies through git and Makefile creation time. We # obviously don't want to do this so instead we provide the diff --git a/pkgs/development/libraries/science/math/or-tools/protobuf.patch b/pkgs/development/libraries/science/math/or-tools/protobuf.patch new file mode 100644 index 00000000000..b0cce40434c --- /dev/null +++ b/pkgs/development/libraries/science/math/or-tools/protobuf.patch @@ -0,0 +1,10 @@ +--- a/makefiles/Makefile.third_party.unix.mk ++++ b/makefiles/Makefile.third_party.unix.mk +@@ -24,1 +24,1 @@ GLOG_TAG = 0.4.0 +-PROTOBUF_TAG = 3.9.0 ++PROTOBUF_TAG = 3.7.0 +--- a/makefiles/Makefile.third_party.win.mk ++++ b/makefiles/Makefile.third_party.win.mk +@@ -40 +40 @@ GLOG_TAG = 0.4.0 +-PROTOBUF_TAG = 3.9.0 ++PROTOBUF_TAG = 3.7.0