2021-05-28 09:39:13 +00:00
|
|
|
{ lib
|
|
|
|
, appdirs
|
|
|
|
, buildPythonPackage
|
2022-04-27 09:35:20 +00:00
|
|
|
, certifi
|
2021-05-28 09:39:13 +00:00
|
|
|
, fetchFromGitHub
|
2021-12-06 16:07:01 +00:00
|
|
|
, importlib-metadata
|
2021-05-28 09:39:13 +00:00
|
|
|
, poetry-core
|
|
|
|
, pyee
|
|
|
|
, pytest-xdist
|
|
|
|
, pytestCheckHook
|
|
|
|
, pythonOlder
|
|
|
|
, syncer
|
|
|
|
, tqdm
|
|
|
|
, urllib3
|
|
|
|
, websockets
|
|
|
|
}:
|
2020-11-19 00:13:47 +00:00
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "pyppeteer";
|
2022-04-27 09:35:20 +00:00
|
|
|
version = "1.0.2";
|
2021-05-28 09:39:13 +00:00
|
|
|
format = "pyproject";
|
2020-11-19 00:13:47 +00:00
|
|
|
|
2021-12-06 16:07:01 +00:00
|
|
|
disabled = pythonOlder "3.6";
|
|
|
|
|
2021-05-28 09:39:13 +00:00
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = pname;
|
|
|
|
repo = pname;
|
|
|
|
rev = version;
|
2023-03-15 16:39:30 +00:00
|
|
|
hash = "sha256-izMaWtJdkLHMQbyq7o7n46xB8dOHXZ5uO0UXt+twjL4=";
|
2020-11-19 00:13:47 +00:00
|
|
|
};
|
|
|
|
|
2021-05-28 09:39:13 +00:00
|
|
|
nativeBuildInputs = [
|
|
|
|
poetry-core
|
|
|
|
];
|
2020-11-19 00:13:47 +00:00
|
|
|
|
|
|
|
propagatedBuildInputs = [
|
|
|
|
appdirs
|
2022-04-27 09:35:20 +00:00
|
|
|
certifi
|
2021-12-06 16:07:01 +00:00
|
|
|
importlib-metadata
|
2020-11-19 00:13:47 +00:00
|
|
|
pyee
|
2021-05-28 09:39:13 +00:00
|
|
|
tqdm
|
2020-11-19 00:13:47 +00:00
|
|
|
urllib3
|
2021-05-28 09:39:13 +00:00
|
|
|
websockets
|
|
|
|
];
|
|
|
|
|
2023-02-02 18:25:31 +00:00
|
|
|
nativeCheckInputs = [
|
2021-05-28 09:39:13 +00:00
|
|
|
syncer
|
|
|
|
pytest-xdist
|
|
|
|
pytestCheckHook
|
2020-11-19 00:13:47 +00:00
|
|
|
];
|
|
|
|
|
2021-12-06 16:07:01 +00:00
|
|
|
postPatch = ''
|
|
|
|
substituteInPlace pyproject.toml \
|
2022-04-27 09:35:20 +00:00
|
|
|
--replace 'pyee = "^8.1.0"' 'pyee = "*"' \
|
2021-12-06 16:07:01 +00:00
|
|
|
--replace 'websockets = "^9.1"' 'websockets = "*"'
|
|
|
|
'';
|
|
|
|
|
2021-05-28 09:39:13 +00:00
|
|
|
disabledTestPaths = [
|
|
|
|
# Requires network access
|
|
|
|
"tests/test_browser.py"
|
|
|
|
"tests/test_browser_context.py"
|
|
|
|
"tests/test_connection.py"
|
|
|
|
"tests/test_coverage.py"
|
|
|
|
"tests/test_dialog.py"
|
|
|
|
"tests/test_element_handle.py"
|
|
|
|
"tests/test_execution_context.py"
|
|
|
|
"tests/test_frame.py"
|
|
|
|
"tests/test_input.py"
|
|
|
|
"tests/test_launcher.py"
|
|
|
|
"tests/test_network.py"
|
|
|
|
"tests/test_page.py"
|
|
|
|
"tests/test_pyppeteer.py"
|
|
|
|
"tests/test_target.py"
|
|
|
|
"tests/test_tracing.py"
|
|
|
|
"tests/test_worker.py"
|
|
|
|
];
|
|
|
|
|
|
|
|
disabledTests = [
|
|
|
|
# Requires network access
|
|
|
|
"TestScreenShot"
|
|
|
|
"TestBrowserCrash"
|
|
|
|
"TestPDF"
|
|
|
|
];
|
|
|
|
|
2021-12-06 16:07:01 +00:00
|
|
|
pythonImportsCheck = [
|
|
|
|
"pyppeteer"
|
|
|
|
];
|
2021-05-28 09:39:13 +00:00
|
|
|
|
2021-12-06 16:07:01 +00:00
|
|
|
meta = with lib; {
|
2020-11-19 00:13:47 +00:00
|
|
|
description = "Headless chrome/chromium automation library (unofficial port of puppeteer)";
|
|
|
|
homepage = "https://github.com/pyppeteer/pyppeteer";
|
2021-12-06 16:07:01 +00:00
|
|
|
license = licenses.mit;
|
|
|
|
maintainers = with maintainers; [ kmein ];
|
2020-11-19 00:13:47 +00:00
|
|
|
};
|
|
|
|
}
|