1{ lib
2, stdenv
3, fetchFromGitHub
4, python3
5}:
6
7python3.pkgs.buildPythonApplication rec {
8 pname = "maigret";
9 version = "0.4.4";
10
11 src = fetchFromGitHub {
12 owner = "soxoj";
13 repo = pname;
14 rev = "refs/tags/v${version}";
15 hash = "sha256-Z8SnA7Z5+oKW0AOaNf+c/zR30lrPFmXaxxKkbnDXNNs=";
16 };
17
18 nativeBuildInputs = [ python3.pkgs.pythonRelaxDepsHook ];
19 propagatedBuildInputs = with python3.pkgs; [
20 aiodns
21 aiohttp
22 aiohttp-socks
23 arabic-reshaper
24 async-timeout
25 attrs
26 beautifulsoup4
27 certifi
28 chardet
29 cloudscraper
30 colorama
31 future
32 html5lib
33 idna
34 jinja2
35 lxml
36 markupsafe
37 mock
38 multidict
39 networkx
40 pycountry
41 pypdf2
42 pysocks
43 python-bidi
44 pyvis
45 requests
46 requests-futures
47 six
48 socid-extractor
49 soupsieve
50 stem
51 torrequest
52 tqdm
53 typing-extensions
54 webencodings
55 xhtml2pdf
56 xmind
57 yarl
58 ];
59
60 nativeCheckInputs = with python3.pkgs; [
61 pytest-httpserver
62 pytest-asyncio
63 pytestCheckHook
64 ];
65
66 pythonRelaxDeps = true;
67 pythonRemoveDeps = [ "future-annotations" ];
68
69 pytestFlagsArray = [
70 # DeprecationWarning: There is no current event loop
71 "-W ignore::DeprecationWarning"
72 ];
73
74 disabledTests = [
75 # Tests require network access
76 "test_extract_ids_from_page"
77 "test_import_aiohttp_cookies"
78 "test_maigret_results"
79 "test_pdf_report"
80 "test_self_check_db_negative_enabled"
81 "test_self_check_db_positive_enable"
82 ] ++ lib.optionals stdenv.isDarwin [
83 # AsyncioProgressbarExecutor is slower on darwin than it should be,
84 # Upstream issue: https://github.com/soxoj/maigret/issues/679
85 "test_asyncio_progressbar_executor"
86 ];
87
88 pythonImportsCheck = [
89 "maigret"
90 ];
91
92 meta = with lib; {
93 description = "Tool to collect details about an username";
94 homepage = "https://maigret.readthedocs.io";
95 license = with licenses; [ mit ];
96 maintainers = with maintainers; [ fab ];
97 };
98}