depot/third_party/nixpkgs/pkgs/development/python-modules/pure-protobuf/default.nix
Default email 410b979fe2 Project import generated by Copybara.
GitOrigin-RevId: a64e169e396460d6b5763a1de1dd197df8421688
2023-03-24 01:07:29 +01:00

50 lines
938 B
Nix

{ lib
, buildPythonPackage
, pythonOlder
, fetchFromGitHub
, setuptools-scm
, toml
, pytestCheckHook
, pytest-benchmark
, hatch-vcs
, hatchling
}:
buildPythonPackage rec {
pname = "pure-protobuf";
version = "2.2.3";
format = "pyproject";
disabled = pythonOlder "3.7";
# PyPi lacks tests.
src = fetchFromGitHub {
owner = "eigenein";
repo = "protobuf";
rev = version;
hash = "sha256-FsVWlYPav4uusdEPXc5hScLeNJWfbSjGOLuZ7yZXyCw=";
};
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";
license = licenses.mit;
maintainers = with maintainers; [ chuangzhu ];
};
}