python3Packages.protobuf: allow for buildPackages.protobuf to be passed

This commit is contained in:
Jonathan Ringer 2022-07-14 10:46:16 -07:00 committed by Jonathan Ringer
parent 9eb60f25af
commit 2c184fc200

View File

@ -19,7 +19,12 @@ buildPythonPackage {
doCheck = doCheck && !isPy27; # setuptools>=41.4 no longer collects correctly on python2 doCheck = doCheck && !isPy27; # setuptools>=41.4 no longer collects correctly on python2
propagatedBuildInputs = [ six ] ++ lib.optionals isPy27 [ google-apputils ]; propagatedBuildInputs = [ six ] ++ lib.optionals isPy27 [ google-apputils ];
propagatedNativeBuildInputs = [ buildPackages.protobuf ]; # For protoc. propagatedNativeBuildInputs = let
protobufVersion = "${lib.versions.major protobuf.version}_${lib.versions.minor protobuf.version}";
in [
buildPackages."protobuf${protobufVersion}" # For protoc of the same version.
];
nativeBuildInputs = [ pyext ] ++ lib.optionals isPy27 [ google-apputils ]; nativeBuildInputs = [ pyext ] ++ lib.optionals isPy27 [ google-apputils ];
buildInputs = [ protobuf ]; buildInputs = [ protobuf ];