Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)
1{ lib, buildPythonPackage, fetchFromGitHub }: 2let 3 tagVersion = "2.2019-12-21"; 4in 5buildPythonPackage { 6 pname = "publicsuffix2"; 7 # tags have dashes, while the library version does not 8 # see https://github.com/nexB/python-publicsuffix2/issues/12 9 version = lib.replaceStrings ["-"] [""] tagVersion; 10 11 src = fetchFromGitHub { 12 owner = "nexB"; 13 repo = "python-publicsuffix2"; 14 rev = "release-${tagVersion}"; 15 sha256 = "1dkvfvl0izq9hqzilnw8ipkbgjs9xyad9p21i3864hzinbh0wp9r"; 16 }; 17 18 postPatch = '' 19 # only used to update the interal publicsuffix list 20 substituteInPlace setup.py \ 21 --replace "'requests >= 2.7.0'," "" 22 ''; 23 24 pythonImportsCheck = [ "publicsuffix2" ]; 25 26 meta = with lib; { 27 description = "Get a public suffix for a domain name using the Public Suffix List"; 28 homepage = "https://github.com/nexB/python-publicsuffix2"; 29 license = licenses.mpl20; 30 maintainers = with maintainers; [ SuperSandro2000 ]; 31 }; 32}