1{
2 lib,
3 babel,
4 buildPythonPackage,
5 fetchFromGitLab,
6 fetchpatch,
7 html2text,
8 lxml,
9 packaging,
10 pillow,
11 prettytable,
12 pycountry,
13 pytestCheckHook,
14 python-dateutil,
15 python-jose,
16 pythonOlder,
17 pyyaml,
18 requests,
19 rich,
20 setuptools,
21 testers,
22 unidecode,
23 woob,
24}:
25
26buildPythonPackage rec {
27 pname = "woob";
28 version = "3.6";
29 pyproject = true;
30
31 disabled = pythonOlder "3.7";
32
33 src = fetchFromGitLab {
34 owner = "woob";
35 repo = "woob";
36 rev = version;
37 hash = "sha256-M9AjV954H1w64YGCVxDEGGSnoEbmocG3zwltob6IW04=";
38 };
39
40 patches = [
41 (fetchpatch {
42 name = "no-deprecated-pkg_resources.patch";
43 url = "https://gitlab.com/woob/woob/-/commit/3283c4c1a935cc71acea98b2d8c88bc4bf28f643.patch";
44 hash = "sha256-3bRuv93ivKRxbGr52coO023DlxHZWwUeInXTPqQAeL8=";
45 })
46 ];
47
48 nativeBuildInputs = [
49 setuptools
50 ];
51
52 pythonRelaxDeps = [ "packaging" ];
53
54 propagatedBuildInputs = [
55 babel
56 python-dateutil
57 python-jose
58 html2text
59 lxml
60 packaging
61 pillow
62 prettytable
63 pycountry
64 pyyaml
65 requests
66 rich
67 unidecode
68 ];
69
70 nativeCheckInputs = [ pytestCheckHook ];
71
72 disabledTests = [
73 # require networking
74 "test_ciphers"
75 "test_verify"
76 ];
77
78 pythonImportsCheck = [ "woob" ];
79
80 passthru.tests.version = testers.testVersion {
81 package = woob;
82 version = "v${version}";
83 };
84
85 meta = with lib; {
86 changelog = "https://gitlab.com/woob/woob/-/blob/${src.rev}/ChangeLog";
87 description = "Collection of applications and APIs to interact with websites";
88 mainProgram = "woob";
89 homepage = "https://woob.tech";
90 license = licenses.lgpl3Plus;
91 maintainers = with maintainers; [ DamienCassou ];
92 };
93}