nixpkgs/pkgs/development/python-modules/publicsuffix/default.nix
2024-04-12 17:35:45 +02:00

38 lines
841 B
Nix

{
lib,
buildPythonPackage,
fetchPypi,
setuptools,
pythonOlder,
}:
buildPythonPackage rec {
pname = "publicsuffix";
version = "1.1.1";
pyproject = true;
disabled = pythonOlder "3.7";
src = fetchPypi {
inherit pname version;
hash = "sha256-Is4dZatq9emyEi4kQ/rNuT+1xKvyQTgJnLEP55ifQ7Y=";
};
# disable test_fetch and the doctests (which also invoke fetch)
postPatch = ''
sed -i -e "/def test_fetch/i\\
\\t@unittest.skip('requires internet')" -e "/def additional_tests():/,+1d" tests.py
'';
build-system = [ setuptools ];
pythonImportsCheck = [ "publicsuffix" ];
meta = with lib; {
description = "Allows to get the public suffix of a domain name";
homepage = "https://pypi.python.org/pypi/publicsuffix/";
license = licenses.mit;
maintainers = with maintainers; [ ];
};
}