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 = [
53 "packaging"
54 "rich"
55 ];
56
57 propagatedBuildInputs = [
58 babel
59 python-dateutil
60 python-jose
61 html2text
62 lxml
63 packaging
64 pillow
65 prettytable
66 pycountry
67 pyyaml
68 requests
69 rich
70 unidecode
71 ];
72
73 nativeCheckInputs = [ pytestCheckHook ];
74
75 disabledTests = [
76 # require networking
77 "test_ciphers"
78 "test_verify"
79 ];
80
81 pythonImportsCheck = [ "woob" ];
82
83 passthru.tests.version = testers.testVersion {
84 package = woob;
85 version = "v${version}";
86 };
87
88 meta = with lib; {
89 changelog = "https://gitlab.com/woob/woob/-/blob/${src.rev}/ChangeLog";
90 description = "Collection of applications and APIs to interact with websites";
91 mainProgram = "woob";
92 homepage = "https://woob.tech";
93 license = licenses.lgpl3Plus;
94 maintainers = with maintainers; [ DamienCassou ];
95 };
96}