1{ 2 lib, 3 buildPythonPackage, 4 pythonOlder, 5 fetchFromGitHub, 6 poetry-core, 7 poetry-dynamic-versioning, 8 typing-extensions, 9 pytestCheckHook, 10 pytest-benchmark, 11 pytest-cov-stub, 12 pydantic, 13}: 14 15buildPythonPackage rec { 16 pname = "pure-protobuf"; 17 version = "3.1.5"; 18 19 format = "pyproject"; 20 # < 3.10 requires get-annotations which isn't packaged yet 21 disabled = pythonOlder "3.10"; 22 23 src = fetchFromGitHub { 24 owner = "eigenein"; 25 repo = "protobuf"; 26 tag = version; 27 hash = "sha256-Gr5fKpagSUzH34IKHb+pBta4q71AqYa/KG9XW2AxZqk="; 28 }; 29 30 build-system = [ 31 poetry-core 32 poetry-dynamic-versioning 33 typing-extensions 34 ]; 35 36 dependencies = [ typing-extensions ]; 37 38 nativeCheckInputs = [ 39 pydantic 40 pytestCheckHook 41 pytest-benchmark 42 pytest-cov-stub 43 ]; 44 45 pytestFlags = [ "--benchmark-disable" ]; 46 47 pythonImportsCheck = [ "pure_protobuf" ]; 48 49 meta = with lib; { 50 description = "Python implementation of Protocol Buffers with dataclass-based schemas"; 51 homepage = "https://github.com/eigenein/protobuf"; 52 changelog = "https://github.com/eigenein/protobuf/releases/tag/${src.tag}"; 53 license = licenses.mit; 54 maintainers = with maintainers; [ chuangzhu ]; 55 }; 56}