fork
Configure Feed
Select the types of activity you want to include in your feed.
nixpkgs mirror (for testing)
github.com/NixOS/nixpkgs
nix
fork
Configure Feed
Select the types of activity you want to include in your feed.
1{
2 lib,
3 stdenv,
4 fetchFromGitHub,
5 fetchpatch,
6 python312,
7}:
8
9python312.pkgs.buildPythonApplication rec {
10 pname = "maigret";
11 version = "0.4.4";
12 pyproject = true;
13
14 src = fetchFromGitHub {
15 owner = "soxoj";
16 repo = "maigret";
17 tag = "v${version}";
18 hash = "sha256-Z8SnA7Z5+oKW0AOaNf+c/zR30lrPFmXaxxKkbnDXNNs=";
19 };
20
21 patches = [
22 # https://github.com/soxoj/maigret/pull/1117
23 (fetchpatch {
24 name = "pytest-7.3-compatibility.patch";
25 url = "https://github.com/soxoj/maigret/commit/ecb33de9e6eec12b6b45a1152199177f32c85be2.patch";
26 hash = "sha256-nFx3j1Q37YLtYhb0QS34UgZFgAc5Z/RVgbO9o1n1ONE=";
27 })
28 ];
29
30 build-system = with python312.pkgs; [ setuptools ];
31
32 dependencies = with python312.pkgs; [
33 aiodns
34 aiohttp
35 aiohttp-socks
36 arabic-reshaper
37 async-timeout
38 attrs
39 beautifulsoup4
40 certifi
41 chardet
42 cloudscraper
43 colorama
44 future
45 html5lib
46 idna
47 jinja2
48 lxml
49 markupsafe
50 mock
51 multidict
52 networkx
53 pycountry
54 pypdf2
55 pysocks
56 python-bidi
57 pyvis
58 requests
59 requests-futures
60 six
61 socid-extractor
62 soupsieve
63 stem
64 torrequest
65 tqdm
66 typing-extensions
67 webencodings
68 xhtml2pdf
69 xmind
70 yarl
71 ];
72
73 nativeCheckInputs = with python312.pkgs; [
74 pytest-httpserver
75 pytest-asyncio
76 pytestCheckHook
77 ];
78
79 pythonRelaxDeps = true;
80
81 pythonRemoveDeps = [ "future-annotations" ];
82
83 pytestFlags = [
84 # DeprecationWarning: There is no current event loop
85 "-Wignore::DeprecationWarning"
86 ];
87
88 disabledTests = [
89 # Tests require network access
90 "test_extract_ids_from_page"
91 "test_import_aiohttp_cookies"
92 "test_maigret_results"
93 "test_pdf_report"
94 "test_self_check_db_negative_enabled"
95 "test_self_check_db_positive_enable"
96 ]
97 ++ lib.optionals stdenv.hostPlatform.isDarwin [
98 # AsyncioProgressbarExecutor is slower on darwin than it should be,
99 # Upstream issue: https://github.com/soxoj/maigret/issues/679
100 "test_asyncio_progressbar_executor"
101 ];
102
103 pythonImportsCheck = [ "maigret" ];
104
105 meta = {
106 description = "Tool to collect details about an username";
107 homepage = "https://maigret.readthedocs.io";
108 license = lib.licenses.mit;
109 maintainers = with lib.maintainers; [
110 fab
111 thtrf
112 ];
113 broken = stdenv.hostPlatform.isDarwin;
114 };
115}