python3Packages.mypy-protobuf: Build using buildPythonPackage

Reformat, tried to enable tests but we miss a dependency, added
pythonImportsCheck. Added top-level attribute to expose executables.
This commit is contained in:
Martin Weinelt 2022-10-02 14:37:04 +02:00
parent f3ec61b6df
commit 156a0827bd
2 changed files with 27 additions and 3 deletions

View File

@ -1,6 +1,14 @@
{ lib, fetchPypi, buildPythonApplication, protobuf, types-protobuf, grpcio-tools, pythonOlder }:
{ lib
, fetchPypi
, buildPythonPackage
, protobuf
, types-protobuf
, grpcio-tools
, pytestCheckHook
, pythonOlder
}:
buildPythonApplication rec {
buildPythonPackage rec {
pname = "mypy-protobuf";
version = "3.3.0";
format = "pyproject";
@ -12,7 +20,21 @@ buildPythonApplication rec {
sha256 = "sha256-JPOwrssGZW6YP1jgfHMqkFd7nXrz4QZvwrZju/A3Akg=";
};
propagatedBuildInputs = [ protobuf types-protobuf grpcio-tools ];
propagatedBuildInputs = [
protobuf
types-protobuf
grpcio-tools
];
doCheck = false; # ModuleNotFoundError: No module named 'testproto'
checkInputs = [
pytestCheckHook
];
pythonImportsCheck = [
"mypy_protobuf"
];
meta = with lib; {
description = "Generate mypy stub files from protobuf specs";

View File

@ -17614,6 +17614,8 @@ with pkgs;
mypy = with python3Packages; toPythonApplication mypy;
mypy-protobuf = with python3Packages; toPythonApplication mypy-protobuf;
nsis = callPackage ../development/tools/nsis { };
tockloader = callPackage ../development/tools/misc/tockloader { };