From 204870b535885d545265458c6cb920f3e901883a Mon Sep 17 00:00:00 2001 From: Theodore Ni <3806110+tjni@users.noreply.github.com> Date: Sat, 19 Aug 2023 03:47:19 -0700 Subject: [PATCH] python3.pkgs.pytest-mockservers: fully replace poetry with poetry-core --- .../pytest-mockservers/default.nix | 17 ++++++++++++----- 1 file changed, 12 insertions(+), 5 deletions(-) diff --git a/pkgs/development/python-modules/pytest-mockservers/default.nix b/pkgs/development/python-modules/pytest-mockservers/default.nix index d65b29d7662f..d524457ebbb4 100644 --- a/pkgs/development/python-modules/pytest-mockservers/default.nix +++ b/pkgs/development/python-modules/pytest-mockservers/default.nix @@ -2,6 +2,7 @@ , buildPythonPackage , pythonOlder , fetchFromGitHub +, fetchpatch , poetry-core , aiohttp , pytest @@ -19,13 +20,17 @@ buildPythonPackage rec { owner = "Gr1N"; repo = pname; rev = version; - sha256 = "0xql0fnw7m2zn103601gqbpyd761kzvgjj2iz9hjsv56nr4z1g9i"; + hash = "sha256-Mb3wSbambC1h+lFI+fafwZzm78IvADNAsF/Uw60DFHc="; }; - postPatch = '' - substituteInPlace pyproject.toml \ - --replace "poetry.masonry.api" "poetry.core.masonry.api" - ''; + patches = [ + # https://github.com/Gr1N/pytest-mockservers/pull/75 + (fetchpatch { + name = "use-poetry-core.patch"; + url = "https://github.com/Gr1N/pytest-mockservers/commit/c7731186a4e12851ab1c15ab56e652bb48ed59c4.patch"; + hash = "sha256-/5X3xjJwt2gs3t6f/6n1QZ+CTBq/5+cQE+MgNWyz+Hs="; + }) + ]; nativeBuildInputs = [ poetry-core @@ -40,6 +45,8 @@ buildPythonPackage rec { pytest-asyncio ]; + __darwinAllowLocalNetworking = true; + nativeCheckInputs = [ pytestCheckHook ];