1{
2 lib,
3 async-timeout,
4 buildPythonPackage,
5 defang,
6 dnspython,
7 eval-type-backport,
8 fetchFromGitHub,
9 playwrightcapture,
10 poetry-core,
11 pydantic,
12 pythonOlder,
13 redis,
14 requests,
15 ua-parser,
16}:
17
18buildPythonPackage rec {
19 pname = "lacuscore";
20 version = "1.16.6";
21 pyproject = true;
22
23 disabled = pythonOlder "3.9";
24
25 src = fetchFromGitHub {
26 owner = "ail-project";
27 repo = "LacusCore";
28 tag = "v${version}";
29 hash = "sha256-LcqGJU+wMKTF1E4asysQPcfURqmgc4WQompPpHEgjb8=";
30 };
31
32 pythonRelaxDeps = [
33 "pydantic"
34 "redis"
35 "requests"
36 ];
37
38 build-system = [ poetry-core ];
39
40 dependencies = [
41 defang
42 dnspython
43 playwrightcapture
44 pydantic
45 redis
46 requests
47 ua-parser
48 ]
49 ++ playwrightcapture.optional-dependencies.recaptcha
50 ++ redis.optional-dependencies.hiredis
51 ++ ua-parser.optional-dependencies.regex
52 ++ lib.optionals (pythonOlder "3.11") [ async-timeout ]
53 ++ lib.optionals (pythonOlder "3.10") [ eval-type-backport ];
54
55 # Module has no tests
56 doCheck = false;
57
58 pythonImportsCheck = [ "lacuscore" ];
59
60 meta = with lib; {
61 description = "Modulable part of Lacus";
62 homepage = "https://github.com/ail-project/LacusCore";
63 changelog = "https://github.com/ail-project/LacusCore/releases/tag/${src.tag}";
64 license = licenses.bsd3;
65 maintainers = with maintainers; [ fab ];
66 };
67}