1{ lib 2, asyncio-dgram 3, buildPythonPackage 4, click 5, dnspython 6, fetchFromGitHub 7, mock 8, poetry-core 9, pytest-asyncio 10, pytestCheckHook 11, pythonOlder 12}: 13 14buildPythonPackage rec { 15 pname = "mcstatus"; 16 version = "9.3.0"; 17 format = "pyproject"; 18 19 disabled = pythonOlder "3.7"; 20 21 src = fetchFromGitHub { 22 owner = "py-mine"; 23 repo = pname; 24 rev = "v${version}"; 25 hash = "sha256-kNThVElEDqhbCitktBv5tQkjMaU4IsX0dJk63hvLhb0="; 26 }; 27 28 nativeBuildInputs = [ 29 poetry-core 30 ]; 31 32 propagatedBuildInputs = [ 33 asyncio-dgram 34 click 35 dnspython 36 ]; 37 38 checkInputs = [ 39 mock 40 pytest-asyncio 41 pytestCheckHook 42 ]; 43 44 postPatch = '' 45 substituteInPlace pyproject.toml \ 46 --replace 'version = "0.0.0"' 'version = "${version}"' \ 47 --replace " --cov=mcstatus --cov-append --cov-branch --cov-report=term-missing -vvv --no-cov-on-fail" "" \ 48 --replace 'asyncio-dgram = "2.1.2"' 'asyncio-dgram = ">=2.1.2"' \ 49 --replace 'dnspython = "2.2.1"' 'dnspython = ">=2.2.0"' 50 ''; 51 52 pythonImportsCheck = [ 53 "mcstatus" 54 ]; 55 56 disabledTests = [ 57 # DNS features are limited in the sandbox 58 "test_query" 59 "test_query_retry" 60 ]; 61 62 meta = with lib; { 63 description = "Python library for checking the status of Minecraft servers"; 64 homepage = "https://github.com/py-mine/mcstatus"; 65 license = with licenses; [ asl20 ]; 66 maintainers = with maintainers; [ fab ]; 67 }; 68}