2022-10-02 14:37:04 +02:00
|
|
|
{ lib
|
|
|
|
, fetchPypi
|
|
|
|
, buildPythonPackage
|
|
|
|
, protobuf
|
|
|
|
, types-protobuf
|
|
|
|
, grpcio-tools
|
|
|
|
, pytestCheckHook
|
|
|
|
, pythonOlder
|
|
|
|
}:
|
2018-08-17 01:34:39 +02:00
|
|
|
|
2022-10-02 14:37:04 +02:00
|
|
|
buildPythonPackage rec {
|
2018-08-17 01:34:39 +02:00
|
|
|
pname = "mypy-protobuf";
|
2022-11-13 16:07:27 +00:00
|
|
|
version = "3.4.0";
|
2021-10-10 06:00:59 +02:00
|
|
|
format = "pyproject";
|
2021-03-29 10:58:52 -07:00
|
|
|
|
|
|
|
disabled = pythonOlder "3.6";
|
2018-08-17 01:34:39 +02:00
|
|
|
|
|
|
|
src = fetchPypi {
|
|
|
|
inherit pname version;
|
2022-11-13 16:07:27 +00:00
|
|
|
sha256 = "sha256-fXWgeWUbEFB2d2o1pUBeP6dzuKFnEY8bcS5EPppsGKI=";
|
2018-08-17 01:34:39 +02:00
|
|
|
};
|
|
|
|
|
2022-10-02 14:37:04 +02:00
|
|
|
propagatedBuildInputs = [
|
|
|
|
protobuf
|
|
|
|
types-protobuf
|
|
|
|
grpcio-tools
|
|
|
|
];
|
|
|
|
|
|
|
|
doCheck = false; # ModuleNotFoundError: No module named 'testproto'
|
|
|
|
|
|
|
|
checkInputs = [
|
|
|
|
pytestCheckHook
|
|
|
|
];
|
|
|
|
|
|
|
|
pythonImportsCheck = [
|
|
|
|
"mypy_protobuf"
|
|
|
|
];
|
2018-08-17 01:34:39 +02:00
|
|
|
|
2021-01-11 08:54:33 +01:00
|
|
|
meta = with lib; {
|
2018-08-17 01:34:39 +02:00
|
|
|
description = "Generate mypy stub files from protobuf specs";
|
|
|
|
homepage = "https://github.com/dropbox/mypy-protobuf";
|
|
|
|
license = licenses.asl20;
|
|
|
|
maintainers = with maintainers; [ lnl7 ];
|
|
|
|
};
|
|
|
|
}
|