about summary refs log tree commit diff
path: root/nixpkgs/pkgs/development/python-modules/surt/default.nix
blob: d11e8e2fe53f9dd4f2ef8363cfd14d6cf301ea7a (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
, buildPythonPackage
, fetchFromGitHub
, pytestCheckHook
, pythonOlder
, six
, tldextract
}:

buildPythonPackage rec {
  pname = "surt";
  version = "0.3.1";
  format = "setuptools";

  disabled = pythonOlder "3.7";

  src = fetchFromGitHub {
    owner = "internetarchive";
    repo = "surt";
    # Has no git tag, https://github.com/internetarchive/surt/issues/26
    rev = "6934c321b3e2f66af9c001d882475949f00570c5";
    hash = "sha256-pSMNpFfq2V0ANWNFPcb1DwPHccbfddo9P4xZ+ghwbz4=";
  };

  propagatedBuildInputs = [
    six
    tldextract
  ];

  nativeCheckInputs = [
    pytestCheckHook
  ];

  pythonImportsCheck = [
    "surt"
  ];

  disabledTests = [
    # Tests want to download Public Suffix List
    "test_getPublicPrefix"
    "test_getPublicSuffix"
  ];

  meta = with lib; {
    description = "Sort-friendly URI Reordering Transform (SURT) python module";
    homepage = "https://github.com/internetarchive/surt";
    license = licenses.agpl3Only;
    maintainers = with maintainers; [ Luflosi ];
  };
}