1{ lib 2, buildPythonPackage 3, fetchPypi 4, filelock 5, idna 6, pytest-mock 7, pytestCheckHook 8, pythonOlder 9, requests 10, requests-file 11, responses 12, setuptools-scm 13}: 14 15buildPythonPackage rec { 16 pname = "tldextract"; 17 version = "3.1.2"; 18 disabled = pythonOlder "3.6"; 19 20 src = fetchPypi { 21 inherit pname version; 22 sha256 = "sha256-0gNMNVhlH32P2t6oP7aBBQstZi3GegDZUDJtyQIClEQ="; 23 }; 24 25 nativeBuildInputs = [ setuptools-scm ]; 26 27 propagatedBuildInputs = [ 28 filelock 29 idna 30 requests 31 requests-file 32 ]; 33 34 checkInputs = [ 35 pytest-mock 36 pytestCheckHook 37 responses 38 ]; 39 40 postPatch = '' 41 substituteInPlace pytest.ini --replace " --pylint" "" 42 ''; 43 44 pythonImportsCheck = [ "tldextract" ]; 45 46 meta = with lib; { 47 description = "Python module to accurately separate the TLD from the domain of an URL"; 48 longDescription = '' 49 tldextract accurately separates the gTLD or ccTLD (generic or country code top-level domain) 50 from the registered domain and subdomains of a URL. 51 ''; 52 homepage = "https://github.com/john-kurkowski/tldextract"; 53 license = with licenses; [ bsd3 ]; 54 maintainers = with maintainers; [ fab ]; 55 }; 56}