at 24.11-pre 1.3 kB view raw
1{ 2 lib, 3 buildPythonPackage, 4 factory-boy, 5 faker, 6 fetchPypi, 7 pytestCheckHook, 8 pythonOlder, 9}: 10 11buildPythonPackage rec { 12 pname = "tld"; 13 version = "0.13"; 14 format = "setuptools"; 15 16 disabled = pythonOlder "3.7"; 17 18 src = fetchPypi { 19 inherit pname version; 20 hash = "sha256-k93l4cBL3xhEl26uRAcGN50h9KsjW3PAXXSD4HT7Vik="; 21 }; 22 23 postPatch = '' 24 sed -i "/--cov/d" pytest.ini 25 ''; 26 27 nativeCheckInputs = [ pytestCheckHook ]; 28 29 checkInputs = [ 30 factory-boy 31 faker 32 ]; 33 34 # These tests require network access, but disabledTestPaths doesn't work. 35 # the file needs to be `import`ed by another Python test file, so it 36 # can't simply be removed. 37 preCheck = '' 38 echo > src/tld/tests/test_commands.py 39 ''; 40 41 pythonImportsCheck = [ "tld" ]; 42 43 meta = with lib; { 44 description = "Extracts the top level domain (TLD) from the URL given"; 45 mainProgram = "update-tld-names"; 46 homepage = "https://github.com/barseghyanartur/tld"; 47 changelog = "https://github.com/barseghyanartur/tld/blob/${version}/CHANGELOG.rst"; 48 # https://github.com/barseghyanartur/tld/blob/master/README.rst#license 49 # MPL-1.1 OR GPL-2.0-only OR LGPL-2.1-or-later 50 license = with licenses; [ 51 lgpl21Plus 52 mpl11 53 gpl2Only 54 ]; 55 maintainers = with maintainers; [ fab ]; 56 }; 57}