1{ lib
2, buildPythonPackage
3, factory_boy
4, faker
5, fetchPypi
6, pytestCheckHook
7}:
8
9buildPythonPackage rec {
10 pname = "tld";
11 version = "0.12.6";
12
13 src = fetchPypi {
14 inherit pname version;
15 sha256 = "69fed19d26bb3f715366fb4af66fdeace896c55c052b00e8aaba3a7b63f3e7f0";
16 };
17
18 checkInputs = [
19 factory_boy
20 faker
21 pytestCheckHook
22 ];
23
24 # these tests require network access, but disabledTestPaths doesn't work.
25 # the file needs to be `import`ed by another python test file, so it
26 # can't simply be removed.
27 preCheck = ''
28 echo > src/tld/tests/test_commands.py
29 '';
30 pythonImportsCheck = [ "tld" ];
31
32 meta = with lib; {
33 homepage = "https://github.com/barseghyanartur/tld";
34 description = "Extracts the top level domain (TLD) from the URL given";
35 # https://github.com/barseghyanartur/tld/blob/master/README.rst#license
36 # MPL-1.1 OR GPL-2.0-only OR LGPL-2.1-or-later
37 license = with licenses; [ lgpl21Plus mpl11 gpl2Only ];
38 maintainers = with maintainers; [ fab ];
39 };
40}