1{
2 lib,
3 asyncio-dgram,
4 buildPythonPackage,
5 dnspython,
6 fetchFromGitHub,
7 hatchling,
8 pytest-asyncio,
9 pytest-cov-stub,
10 pytest-rerunfailures,
11 pytestCheckHook,
12 typing-extensions,
13 uv-dynamic-versioning,
14}:
15
16buildPythonPackage rec {
17 pname = "mcstatus";
18 version = "12.0.5";
19 pyproject = true;
20
21 src = fetchFromGitHub {
22 owner = "py-mine";
23 repo = "mcstatus";
24 tag = "v${version}";
25 hash = "sha256-gtLWUIxG40MsmavA4KrHJ3btCR/zKdstwiUiZGsoNcw=";
26 };
27
28 build-system = [
29 hatchling
30 uv-dynamic-versioning
31 ];
32
33 dependencies = [
34 asyncio-dgram
35 dnspython
36 ];
37
38 __darwinAllowLocalNetworking = true;
39
40 nativeCheckInputs = [
41 pytest-asyncio
42 pytest-cov-stub
43 pytest-rerunfailures
44 pytest-cov-stub
45 pytestCheckHook
46 typing-extensions
47 ];
48
49 pythonImportsCheck = [ "mcstatus" ];
50
51 disabledTests = [
52 # DNS features are limited in the sandbox
53 "test_resolve_localhost"
54 "test_async_resolve_localhost"
55 "test_java_server_with_query_port"
56 ];
57
58 meta = {
59 description = "Python library for checking the status of Minecraft servers";
60 homepage = "https://github.com/py-mine/mcstatus";
61 changelog = "https://github.com/py-mine/mcstatus/releases/tag/${src.tag}";
62 license = lib.licenses.asl20;
63 maintainers = with lib.maintainers; [
64 fab
65 perchun
66 ];
67 mainProgram = "mcstatus";
68 };
69}