tmuxPlugins.catppucin: unstable-2024-05-16 -> 2.1.2 (#379030)
[NixPkgs.git] / pkgs / development / python-modules / tld / default.nix
blobe6507b54c994c7dafe517a6ffed09bab93b47b7b
2   lib,
3   buildPythonPackage,
4   factory-boy,
5   faker,
6   fetchPypi,
7   pytestCheckHook,
8   pythonOlder,
9 }:
11 buildPythonPackage rec {
12   pname = "tld";
13   version = "0.13";
14   format = "setuptools";
16   disabled = pythonOlder "3.7";
18   src = fetchPypi {
19     inherit pname version;
20     hash = "sha256-k93l4cBL3xhEl26uRAcGN50h9KsjW3PAXXSD4HT7Vik=";
21   };
23   postPatch = ''
24     sed -i "/--cov/d" pytest.ini
25   '';
27   nativeCheckInputs = [ pytestCheckHook ];
29   checkInputs = [
30     factory-boy
31     faker
32   ];
34   # These tests require network access, but disabledTestPaths doesn't work.
35   # the file needs to be `import`ed by another Python test file, so it
36   # can't simply be removed.
37   preCheck = ''
38     echo > src/tld/tests/test_commands.py
39   '';
41   pythonImportsCheck = [ "tld" ];
43   meta = with lib; {
44     description = "Extracts the top level domain (TLD) from the URL given";
45     mainProgram = "update-tld-names";
46     homepage = "https://github.com/barseghyanartur/tld";
47     changelog = "https://github.com/barseghyanartur/tld/blob/${version}/CHANGELOG.rst";
48     # https://github.com/barseghyanartur/tld/blob/master/README.rst#license
49     # MPL-1.1 OR GPL-2.0-only OR LGPL-2.1-or-later
50     license = with licenses; [
51       lgpl21Plus
52       mpl11
53       gpl2Only
54     ];
55     maintainers = with maintainers; [ fab ];
56   };