1{ lib
2, appdirs
3, buildPythonPackage
4, dnspython
5, fetchPypi
6, filelock
7, idna
8, pytestCheckHook
9, uritools
10}:
11
12buildPythonPackage rec {
13 pname = "urlextract";
14 version = "1.4.0";
15
16 src = fetchPypi {
17 inherit pname version;
18 sha256 = "669f07192584b841b49ba8868fbd6b00e7ddc28367d36a3d8ca8c8e429420748";
19 };
20
21 propagatedBuildInputs = [
22 appdirs
23 filelock
24 idna
25 uritools
26 ];
27
28 checkInputs = [
29 dnspython
30 pytestCheckHook
31 ];
32
33 disabledTests = [
34 # fails with dns.resolver.NoResolverConfiguration due to network sandboxing
35 "test_check_dns_enabled"
36 "test_check_dns_find_urls"
37 "test_dns_cache_init"
38 "test_dns_cache_negative"
39 "test_dns_cache_reuse"
40 ];
41
42 pythonImportsCheck = [ "urlextract" ];
43
44 meta = with lib; {
45 description = "Collects and extracts URLs from given text";
46 homepage = "https://github.com/lipoja/URLExtract";
47 license = licenses.mit;
48 maintainers = with maintainers; [ ilkecan ];
49 };
50}