about summary refs log tree commit diff
path: root/nixpkgs/pkgs/development/python-modules/urlextract/default.nix
blob: cc5d2ae000caaefcdcc7c6b2984be930cc6c8b47 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
{ lib
, appdirs
, buildPythonPackage
, dnspython
, fetchPypi
, filelock
, idna
, pytestCheckHook
, uritools
}:

buildPythonPackage rec {
  pname = "urlextract";
  version = "1.4.0";

  src = fetchPypi {
    inherit pname version;
    sha256 = "669f07192584b841b49ba8868fbd6b00e7ddc28367d36a3d8ca8c8e429420748";
  };

  propagatedBuildInputs = [
    appdirs
    filelock
    idna
    uritools
  ];

  checkInputs = [
    dnspython
    pytestCheckHook
  ];

  disabledTests = [
    # fails with dns.resolver.NoResolverConfiguration due to network sandboxing
    "test_check_dns_enabled"
    "test_check_dns_find_urls"
    "test_dns_cache_init"
    "test_dns_cache_negative"
    "test_dns_cache_reuse"
  ];

  pythonImportsCheck = [ "urlextract" ];

  meta = with lib; {
    description = "Collects and extracts URLs from given text";
    homepage = "https://github.com/lipoja/URLExtract";
    license = licenses.mit;
    maintainers = with maintainers; [ ilkecan ];
  };
}