2022-03-30 09:31:56 +00:00
|
|
|
{ lib, buildPythonPackage, fetchFromGitHub }:
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "publicsuffix2";
|
2022-03-30 09:31:56 +00:00
|
|
|
version = "2.2019-12-21";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "nexB";
|
|
|
|
repo = "python-publicsuffix2";
|
2022-03-30 09:31:56 +00:00
|
|
|
rev = "release-${version}";
|
2020-04-24 23:36:52 +00:00
|
|
|
sha256 = "1dkvfvl0izq9hqzilnw8ipkbgjs9xyad9p21i3864hzinbh0wp9r";
|
|
|
|
};
|
|
|
|
|
2022-03-30 09:31:56 +00:00
|
|
|
postPatch = ''
|
|
|
|
# only used to update the interal publicsuffix list
|
|
|
|
substituteInPlace setup.py \
|
|
|
|
--replace "'requests >= 2.7.0'," ""
|
|
|
|
'';
|
|
|
|
|
|
|
|
pythonImportsCheck = [ "publicsuffix2" ];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2021-01-15 22:18:51 +00:00
|
|
|
meta = with lib; {
|
2022-03-30 09:31:56 +00:00
|
|
|
description = "Get a public suffix for a domain name using the Public Suffix List";
|
|
|
|
homepage = "https://github.com/nexB/python-publicsuffix2";
|
2020-04-24 23:36:52 +00:00
|
|
|
license = licenses.mpl20;
|
2022-03-30 09:31:56 +00:00
|
|
|
maintainers = with maintainers; [ SuperSandro2000 ];
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
}
|