1{
2 lib,
3 aiohttp,
4 attrs,
5 buildPythonPackage,
6 fetchFromGitHub,
7 fetchpatch,
8 packaging,
9 poetry-core,
10 pythonOlder,
11 structlog,
12}:
13
14buildPythonPackage rec {
15 pname = "arsenic";
16 version = "21.8";
17 pyproject = true;
18
19 disabled = pythonOlder "3.7";
20
21 src = fetchFromGitHub {
22 owner = "HENNGE";
23 repo = "arsenic";
24 tag = 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 # Replace distutils with packaging, https://github.com/HENNGE/arsenic/pull/166
36 (fetchpatch {
37 name = "replace-distutils.patch";
38 url = "https://github.com/HENNGE/arsenic/commit/440faed7d2a8fbd635a135c007051ea494e72873.patch";
39 hash = "sha256-QbOH6EdFKZxm1VaXRiTbJ3zIzEKVet9GUQDaJnmSNQw=";
40 })
41 ];
42
43 pythonRelaxDeps = [ "structlog" ];
44
45 build-system = [ poetry-core ];
46
47 dependencies = [
48 aiohttp
49 attrs
50 packaging
51 structlog
52 ];
53
54 # Test depends on asyncio_extras which is not longer maintained
55 doCheck = false;
56
57 pythonImportsCheck = [ "arsenic" ];
58
59 meta = with lib; {
60 description = "WebDriver implementation for asyncio and asyncio-compatible frameworks";
61 homepage = "https://github.com/HENNGE/arsenic/";
62 changelog = "https://github.com/HENNGE/arsenic/releases/tag/${version}";
63 license = licenses.asl20;
64 maintainers = with maintainers; [ fab ];
65 };
66}