From be8569be499490fc04eff48c2d27dd9d89aaa60d Mon Sep 17 00:00:00 2001 From: Ben Wolsieffer Date: Sat, 24 Nov 2018 18:09:52 -0500 Subject: [PATCH] pythonPackages.protobuf: fix compatibility with Python 3.7 --- pkgs/development/python-modules/protobuf/default.nix | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/pkgs/development/python-modules/protobuf/default.nix b/pkgs/development/python-modules/protobuf/default.nix index 9059080c9196..a9d20983a55c 100644 --- a/pkgs/development/python-modules/protobuf/default.nix +++ b/pkgs/development/python-modules/protobuf/default.nix @@ -1,4 +1,4 @@ -{ stdenv, python, buildPythonPackage +{ stdenv, fetchpatch, python, buildPythonPackage , protobuf, google_apputils, pyext, libcxx , disabled, doCheck ? true }: @@ -16,6 +16,15 @@ buildPythonPackage rec { propagatedBuildInputs = [ protobuf google_apputils ]; buildInputs = [ google_apputils pyext ]; + patches = [ + # 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 cd *