Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)
1{ 2 lib, 3 buildPythonPackage, 4 factory-boy, 5 faker, 6 fetchPypi, 7 pytestCheckHook, 8 pytest-cov-stub, 9 pythonOlder, 10}: 11 12buildPythonPackage rec { 13 pname = "tld"; 14 version = "0.13"; 15 format = "setuptools"; 16 17 disabled = pythonOlder "3.7"; 18 19 src = fetchPypi { 20 inherit pname version; 21 hash = "sha256-k93l4cBL3xhEl26uRAcGN50h9KsjW3PAXXSD4HT7Vik="; 22 }; 23 24 nativeCheckInputs = [ 25 pytestCheckHook 26 pytest-cov-stub 27 ]; 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}