1{ lib
2, buildPythonPackage
3, pythonOlder
4, fetchFromGitHub
5, setuptools-scm
6, toml
7, pytestCheckHook
8, pytest-benchmark
9, hatch-vcs
10, hatchling
11}:
12
13buildPythonPackage rec {
14 pname = "pure-protobuf";
15 version = "2.3.0";
16
17 format = "pyproject";
18 disabled = pythonOlder "3.7";
19
20 src = fetchFromGitHub {
21 owner = "eigenein";
22 repo = "protobuf";
23 rev = "refs/tags/${version}";
24 hash = "sha256-nJ3F8dUrqMeWqTV9ErGqrMvofJwBKwNUDfxWIqFh4nY=";
25 };
26
27 SETUPTOOLS_SCM_PRETEND_VERSION = version;
28
29 nativeBuildInputs = [
30 hatch-vcs
31 hatchling
32 ];
33
34 checkInputs = [
35 pytestCheckHook
36 pytest-benchmark
37 ];
38
39 pythonImportsCheck = [
40 "pure_protobuf"
41 ];
42
43 meta = with lib; {
44 description = "Python implementation of Protocol Buffers with dataclass-based schemas";
45 homepage = "https://github.com/eigenein/protobuf";
46 changelog = "https://github.com/eigenein/protobuf/releases/tag/${version}";
47 license = licenses.mit;
48 maintainers = with maintainers; [ chuangzhu ];
49 };
50}