From 91d9032d21b6045fad3123e6600172082c0eaff7 Mon Sep 17 00:00:00 2001 From: Fabian Affolter Date: Fri, 26 Nov 2021 08:26:53 +0100 Subject: [PATCH] python3Packages.aiopvapi: patch support for async_timeout>4 --- pkgs/development/python-modules/aiopvapi/default.nix | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/pkgs/development/python-modules/aiopvapi/default.nix b/pkgs/development/python-modules/aiopvapi/default.nix index b8614d0c97d2..556510828914 100644 --- a/pkgs/development/python-modules/aiopvapi/default.nix +++ b/pkgs/development/python-modules/aiopvapi/default.nix @@ -28,7 +28,16 @@ buildPythonPackage rec { pytestCheckHook ]; - pythonImportsCheck = [ "aiopvapi" ]; + postPatch = '' + # async_timeout 4.0.0 removes loop, https://github.com/sander76/aio-powerview-api/pull/13 + # Patch doesn't apply due to different line endings + substituteInPlace aiopvapi/helpers/aiorequest.py \ + --replace ", loop=self.loop)" ")" + ''; + + pythonImportsCheck = [ + "aiopvapi" + ]; meta = with lib; { description = "Python API for the PowerView API";