1{ lib, buildPythonPackage, fetchFromGitHub }: 2 3buildPythonPackage rec { 4 pname = "publicsuffix2"; 5 version = "2.2019-12-21"; 6 7 src = fetchFromGitHub { 8 owner = "nexB"; 9 repo = "python-publicsuffix2"; 10 rev = "release-${version}"; 11 sha256 = "1dkvfvl0izq9hqzilnw8ipkbgjs9xyad9p21i3864hzinbh0wp9r"; 12 }; 13 14 postPatch = '' 15 # only used to update the interal publicsuffix list 16 substituteInPlace setup.py \ 17 --replace "'requests >= 2.7.0'," "" 18 ''; 19 20 pythonImportsCheck = [ "publicsuffix2" ]; 21 22 meta = with lib; { 23 description = "Get a public suffix for a domain name using the Public Suffix List"; 24 homepage = "https://github.com/nexB/python-publicsuffix2"; 25 license = licenses.mpl20; 26 maintainers = with maintainers; [ SuperSandro2000 ]; 27 }; 28}