From e453e77515fb981316600398fa0ec9ebd734fccb Mon Sep 17 00:00:00 2001 From: Fabian Affolter Date: Mon, 8 Jan 2024 09:33:15 +0100 Subject: [PATCH] python311Packages.notifications-python-client: refactor --- .../notifications-python-client/default.nix | 17 +++++++++++------ 1 file changed, 11 insertions(+), 6 deletions(-) diff --git a/pkgs/development/python-modules/notifications-python-client/default.nix b/pkgs/development/python-modules/notifications-python-client/default.nix index 63f739489c3e..353c5fc3d42e 100644 --- a/pkgs/development/python-modules/notifications-python-client/default.nix +++ b/pkgs/development/python-modules/notifications-python-client/default.nix @@ -10,6 +10,7 @@ , pythonOlder , requests , requests-mock +, setuptools }: buildPythonPackage rec { @@ -21,11 +22,20 @@ buildPythonPackage rec { src = fetchFromGitHub { owner = "alphagov"; - repo = pname; + repo = "notifications-python-client"; rev = "refs/tags/${version}"; hash = "sha256-HDxCVwagHFenx0S2TPxiMIyyq4ovxe0yNi76sX2CC9s="; }; + postPatch = '' + substituteInPlace setup.py \ + --replace "pytest-runner" "" + ''; + + nativeBuildInputs = [ + setuptools + ]; + propagatedBuildInputs = [ docopt pyjwt @@ -40,11 +50,6 @@ buildPythonPackage rec { requests-mock ]; - postPatch = '' - substituteInPlace setup.py \ - --replace "pytest-runner" "" - ''; - pythonImportsCheck = [ "notifications_python_client" ];