diff --git a/pkgs/development/python-modules/protobuf/default.nix b/pkgs/development/python-modules/protobuf/default.nix index a9d20983a55c..7a67ce292406 100644 --- a/pkgs/development/python-modules/protobuf/default.nix +++ b/pkgs/development/python-modules/protobuf/default.nix @@ -1,4 +1,4 @@ -{ stdenv, fetchpatch, python, buildPythonPackage +{ stdenv, fetchpatch, python, buildPythonPackage, isPy37 , protobuf, google_apputils, pyext, libcxx , disabled, doCheck ? true }: @@ -16,14 +16,14 @@ buildPythonPackage rec { propagatedBuildInputs = [ protobuf google_apputils ]; buildInputs = [ google_apputils pyext ]; - patches = [ + patches = optional isPy37 # Python 3.7 compatibility (remove when protobuf 3.7 is released) (fetchpatch { url = "https://github.com/protocolbuffers/protobuf/commit/0a59054c30e4f0ba10f10acfc1d7f3814c63e1a7.patch"; sha256 = "09hw22y3423v8bbmc9xm07znwdxfbya6rp78d4zqw6fisdvjkqf1"; stripLen = 1; }) - ]; + ; prePatch = '' while [ ! -d python ]; do diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 2ddb4755c32b..6b63bd55e4c7 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -21800,9 +21800,9 @@ in }; caffe2 = callPackage ../development/libraries/science/math/caffe2 (rec { - inherit (python3Packages) python future six numpy pydot; + inherit (python36Packages) python future six numpy pydot; protobuf = protobuf3_1; - python-protobuf = python3Packages.protobuf.override { inherit protobuf; }; + python-protobuf = python36Packages.protobuf.override { inherit protobuf; }; # Used only for image loading. opencv3 = opencv3WithoutCuda; });