94427deb9d
GitOrigin-RevId: f91ee3065de91a3531329a674a45ddcb3467a650
50 lines
1,011 B
Nix
50 lines
1,011 B
Nix
{ lib
|
|
, buildPythonPackage
|
|
, pythonOlder
|
|
, fetchFromGitHub
|
|
, setuptools-scm
|
|
, toml
|
|
, pytestCheckHook
|
|
, pytest-benchmark
|
|
, hatch-vcs
|
|
, hatchling
|
|
}:
|
|
|
|
buildPythonPackage rec {
|
|
pname = "pure-protobuf";
|
|
version = "2.3.0";
|
|
|
|
format = "pyproject";
|
|
disabled = pythonOlder "3.7";
|
|
|
|
src = fetchFromGitHub {
|
|
owner = "eigenein";
|
|
repo = "protobuf";
|
|
rev = "refs/tags/${version}";
|
|
hash = "sha256-nJ3F8dUrqMeWqTV9ErGqrMvofJwBKwNUDfxWIqFh4nY=";
|
|
};
|
|
|
|
SETUPTOOLS_SCM_PRETEND_VERSION = version;
|
|
|
|
nativeBuildInputs = [
|
|
hatch-vcs
|
|
hatchling
|
|
];
|
|
|
|
checkInputs = [
|
|
pytestCheckHook
|
|
pytest-benchmark
|
|
];
|
|
|
|
pythonImportsCheck = [
|
|
"pure_protobuf"
|
|
];
|
|
|
|
meta = with lib; {
|
|
description = "Python implementation of Protocol Buffers with dataclass-based schemas";
|
|
homepage = "https://github.com/eigenein/protobuf";
|
|
changelog = "https://github.com/eigenein/protobuf/releases/tag/${version}";
|
|
license = licenses.mit;
|
|
maintainers = with maintainers; [ chuangzhu ];
|
|
};
|
|
}
|