Skip to content

Commit

Permalink
pythonPackages.protobuf: fix compatibility with Python 3.7
Browse files Browse the repository at this point in the history
  • Loading branch information
lopsided98 authored and worldofpeace committed Nov 27, 2018
1 parent 4380a91 commit be8569b
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion pkgs/development/python-modules/protobuf/default.nix
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{ stdenv, python, buildPythonPackage
{ stdenv, fetchpatch, python, buildPythonPackage
, protobuf, google_apputils, pyext, libcxx
, disabled, doCheck ? true }:

Expand All @@ -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 *
Expand Down

0 comments on commit be8569b

Please sign in to comment.