python312Packages.dash-renderer: remove (#369714)
[NixPkgs.git] / pkgs / development / python-modules / mcstatus / default.nix
bloba58c2aad44b775db9ac0fcec7db4bb6dc1ca8b0d
2   lib,
3   asyncio-dgram,
4   buildPythonPackage,
5   dnspython,
6   fetchFromGitHub,
7   poetry-core,
8   poetry-dynamic-versioning,
9   pytest-asyncio,
10   pytest-rerunfailures,
11   pytestCheckHook,
12   pythonOlder,
15 buildPythonPackage rec {
16   pname = "mcstatus";
17   version = "11.1.1";
18   pyproject = true;
20   disabled = pythonOlder "3.8";
22   src = fetchFromGitHub {
23     owner = "py-mine";
24     repo = pname;
25     tag = "v${version}";
26     hash = "sha256-P8Su5P/ztyoXZBVvm5uCMDn4ezeg11oRSQ0QCyIJbVw=";
27   };
29   postPatch = ''
30     substituteInPlace pyproject.toml \
31       --replace " --cov=mcstatus --cov-append --cov-branch --cov-report=term-missing -vvv --no-cov-on-fail" ""
32   '';
34   nativeBuildInputs = [
35     poetry-core
36     poetry-dynamic-versioning
37   ];
39   propagatedBuildInputs = [
40     asyncio-dgram
41     dnspython
42   ];
44   __darwinAllowLocalNetworking = true;
46   nativeCheckInputs = [
47     pytest-asyncio
48     pytest-rerunfailures
49     pytestCheckHook
50   ];
52   pythonImportsCheck = [ "mcstatus" ];
54   disabledTests = [
55     # DNS features are limited in the sandbox
56     "test_query"
57     "test_query_retry"
58     "test_resolve_localhost"
59     "test_async_resolve_localhost"
60   ];
62   meta = with lib; {
63     description = "Python library for checking the status of Minecraft servers";
64     mainProgram = "mcstatus";
65     homepage = "https://github.com/py-mine/mcstatus";
66     changelog = "https://github.com/py-mine/mcstatus/releases/tag/v${version}";
67     license = with licenses; [ asl20 ];
68     maintainers = with maintainers; [ fab ];
69   };