From 588f41491b31901c6498cdefa0d4fcfe1323a616 Mon Sep 17 00:00:00 2001 From: Martin Weinelt Date: Mon, 18 Mar 2024 03:13:56 +0100 Subject: [PATCH] python311Packages.pure-protobuf: fix build --- .../python-modules/pure-protobuf/default.nix | 29 ++++++++++++++----- 1 file changed, 21 insertions(+), 8 deletions(-) diff --git a/pkgs/development/python-modules/pure-protobuf/default.nix b/pkgs/development/python-modules/pure-protobuf/default.nix index 17a0cbfd4f66..2a7082049703 100644 --- a/pkgs/development/python-modules/pure-protobuf/default.nix +++ b/pkgs/development/python-modules/pure-protobuf/default.nix @@ -2,12 +2,12 @@ , buildPythonPackage , pythonOlder , fetchFromGitHub -, setuptools-scm -, toml +, poetry-core +, poetry-dynamic-versioning +, pydantic , pytestCheckHook , pytest-benchmark -, hatch-vcs -, hatchling +, typing-extensions }: buildPythonPackage rec { @@ -24,16 +24,29 @@ buildPythonPackage rec { hash = "sha256-sGKnta+agrpJkQB0twFkqRreD5WB2O/06g75N0ic4mc="; }; - nativeBuildInputs = [ - hatch-vcs - hatchling + postPatch = '' + sed -i "/addopts =/d" pyproject.toml + ''; + + build-system = [ + poetry-core + poetry-dynamic-versioning ]; - checkInputs = [ + dependencies = [ + typing-extensions + ]; + + nativeCheckInputs = [ + pydantic pytestCheckHook pytest-benchmark ]; + pytestFlagsArray = [ + "--benchmark-disable" + ]; + pythonImportsCheck = [ "pure_protobuf" ];