at master 1.4 kB view raw
1{ 2 lib, 3 buildPythonPackage, 4 fetchFromGitHub, 5 filelock, 6 idna, 7 pytest-mock, 8 pytestCheckHook, 9 pythonOlder, 10 requests, 11 requests-file, 12 responses, 13 setuptools, 14 setuptools-scm, 15 syrupy, 16}: 17 18buildPythonPackage rec { 19 pname = "tldextract"; 20 version = "5.3.0"; 21 pyproject = true; 22 23 disabled = pythonOlder "3.8"; 24 25 src = fetchFromGitHub { 26 owner = "john-kurkowski"; 27 repo = "tldextract"; 28 tag = version; 29 hash = "sha256-PCDjceBU4cjAqRes/yWt/mbM/aWxjYtNl+qN+49OjA8="; 30 }; 31 32 nativeBuildInputs = [ 33 setuptools 34 setuptools-scm 35 ]; 36 37 propagatedBuildInputs = [ 38 filelock 39 idna 40 requests 41 requests-file 42 ]; 43 44 nativeCheckInputs = [ 45 pytest-mock 46 pytestCheckHook 47 responses 48 syrupy 49 ]; 50 51 pythonImportsCheck = [ "tldextract" ]; 52 53 meta = with lib; { 54 description = "Python module to accurately separate the TLD from the domain of an URL"; 55 longDescription = '' 56 tldextract accurately separates the gTLD or ccTLD (generic or country code top-level domain) 57 from the registered domain and subdomains of a URL. 58 ''; 59 homepage = "https://github.com/john-kurkowski/tldextract"; 60 changelog = "https://github.com/john-kurkowski/tldextract/blob/${src.tag}/CHANGELOG.md"; 61 license = with licenses; [ bsd3 ]; 62 maintainers = with maintainers; [ fab ]; 63 mainProgram = "tldextract"; 64 }; 65}