From 88e646ef28ae1fdc29351b0b172858620edb0d24 Mon Sep 17 00:00:00 2001 From: Fabian Affolter Date: Fri, 5 Nov 2021 15:23:10 +0100 Subject: [PATCH] python3Packages.pyppeteer: relax websockets constrain --- .../python-modules/pyppeteer/default.nix | 20 ++++++++++++++----- 1 file changed, 15 insertions(+), 5 deletions(-) diff --git a/pkgs/development/python-modules/pyppeteer/default.nix b/pkgs/development/python-modules/pyppeteer/default.nix index 37a40f867bda..153be45ca8f5 100644 --- a/pkgs/development/python-modules/pyppeteer/default.nix +++ b/pkgs/development/python-modules/pyppeteer/default.nix @@ -2,6 +2,7 @@ , appdirs , buildPythonPackage , fetchFromGitHub +, importlib-metadata , poetry-core , pyee , pytest-xdist @@ -16,9 +17,10 @@ buildPythonPackage rec { pname = "pyppeteer"; version = "0.2.6"; - disabled = pythonOlder "3.6"; format = "pyproject"; + disabled = pythonOlder "3.6"; + src = fetchFromGitHub { owner = pname; repo = pname; @@ -32,6 +34,7 @@ buildPythonPackage rec { propagatedBuildInputs = [ appdirs + importlib-metadata pyee tqdm urllib3 @@ -44,6 +47,11 @@ buildPythonPackage rec { pytestCheckHook ]; + postPatch = '' + substituteInPlace pyproject.toml \ + --replace 'websockets = "^9.1"' 'websockets = "*"' + ''; + disabledTestPaths = [ # Requires network access "tests/test_browser.py" @@ -71,12 +79,14 @@ buildPythonPackage rec { "TestPDF" ]; - pythonImportsCheck = [ "pyppeteer" ]; + pythonImportsCheck = [ + "pyppeteer" + ]; - meta = { + meta = with lib; { description = "Headless chrome/chromium automation library (unofficial port of puppeteer)"; homepage = "https://github.com/pyppeteer/pyppeteer"; - license = lib.licenses.mit; - maintainers = with lib.maintainers; [ kmein ]; + license = licenses.mit; + maintainers = with maintainers; [ kmein ]; }; }