diff --git a/pkgs/development/python-modules/protobuf/default.nix b/pkgs/development/python-modules/protobuf/default.nix index 1a345b19ef94..9059080c9196 100644 --- a/pkgs/development/python-modules/protobuf/default.nix +++ b/pkgs/development/python-modules/protobuf/default.nix @@ -28,7 +28,10 @@ buildPythonPackage rec { export PROTOCOL_BUFFERS_PYTHON_IMPLEMENTATION_VERSION=2 ''; - preBuild = optionalString (versionAtLeast protobuf.version "2.6.0") '' + preBuild = '' + # Workaround for https://github.com/google/protobuf/issues/2895 + ${python}/bin/${python.executable} setup.py build + '' + optionalString (versionAtLeast protobuf.version "2.6.0") '' ${python}/bin/${python.executable} setup.py build_ext --cpp_implementation '';