Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 7 additions & 5 deletions pkgs/development/python-modules/protobuf/default.nix
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
{ stdenv, fetchpatch, python, buildPythonPackage, isPy37
{ buildPackages, stdenv, fetchpatch, python, buildPythonPackage, isPy37
, protobuf, google_apputils, pyext, libcxx, isPy27
, disabled, doCheck ? true }:

with stdenv.lib;

buildPythonPackage {
inherit (protobuf) name src version;
inherit (protobuf) pname src version;
inherit disabled;
doCheck = doCheck && !isPy27; # setuptools>=41.4 no longer collects correctly on python2

Expand All @@ -15,8 +15,10 @@ buildPythonPackage {
++ optional (versionOlder protobuf.version "2.7.0") "-std=c++98"
);

outputs = [ "out" "dev" ];

propagatedBuildInputs = [ google_apputils ];
propagatedNativeBuildInputs = [ protobuf ]; # For protoc.
propagatedNativeBuildInputs = [ buildPackages.protobuf ]; # For protoc.
nativeBuildInputs = [ google_apputils pyext ];
buildInputs = [ protobuf ];

Expand All @@ -43,9 +45,9 @@ buildPythonPackage {

preBuild = ''
# Workaround for https://github.com/google/protobuf/issues/2895
${python.interpreter} setup.py build
${python.pythonForBuild.interpreter} setup.py build
'' + optionalString (versionAtLeast protobuf.version "2.6.0") ''
${python.interpreter} setup.py build_ext --cpp_implementation
${python.pythonForBuild.interpreter} setup.py build_ext --cpp_implementation
'';

installFlags = optional (versionAtLeast protobuf.version "2.6.0")
Expand Down