1{ lib
2, aiohttp
3, attrs
4, buildPythonPackage
5, fetchFromGitHub
6, fetchpatch
7, poetry-core
8, pytestCheckHook
9, pythonRelaxDepsHook
10, pythonOlder
11, structlog
12}:
13
14buildPythonPackage rec {
15 pname = "arsenic";
16 version = "21.8";
17 format = "pyproject";
18
19 disabled = pythonOlder "3.7";
20
21 src = fetchFromGitHub {
22 owner = "HENNGE";
23 repo = pname;
24 rev = "refs/tags/${version}";
25 hash = "sha256-fsLo22PR9WdX2FazPgr8B8dFq6EM1LLTpRFGEm/ymCE=";
26 };
27
28 patches = [
29 # Switch to poetry-core, https://github.com/HENNGE/arsenic/pull/160
30 (fetchpatch {
31 name = "switch-to-poetry-core.patch";
32 url = "https://github.com/HENNGE/arsenic/commit/ca82894a5f1e832ab9283a245258b334bdd48855.patch";
33 hash = "sha256-ECCUaJF4MRmFOKH1C6HowJ+zmbEPPiS7h9DlKw5otZc=";
34 })
35 ];
36
37 pythonRelaxDeps = [
38 "structlog"
39 ];
40
41 nativeBuildInputs = [
42 poetry-core
43 pythonRelaxDepsHook
44 ];
45
46 propagatedBuildInputs = [
47 aiohttp
48 attrs
49 structlog
50 ];
51
52 nativeCheckInputs = [
53 pytestCheckHook
54 ];
55
56 # Depends on asyncio_extras which is not longer maintained
57 doCheck = false;
58
59 pythonImportsCheck = [
60 "arsenic"
61 ];
62
63 meta = with lib; {
64 description = "WebDriver implementation for asyncio and asyncio-compatible frameworks";
65 homepage = "https://github.com/HENNGE/arsenic/";
66 changelog = "https://github.com/HENNGE/arsenic/releases/tag/${version}";
67 license = licenses.asl20;
68 maintainers = with maintainers; [ fab ];
69 };
70}