e7ec2969af
GitOrigin-RevId: 9b19f5e77dd906cb52dade0b7bd280339d2a1f3d
70 lines
1.5 KiB
Nix
70 lines
1.5 KiB
Nix
{ lib
|
|
, asyncio-dgram
|
|
, buildPythonPackage
|
|
, dnspython
|
|
, fetchFromGitHub
|
|
, poetry-core
|
|
, poetry-dynamic-versioning
|
|
, pytest-asyncio
|
|
, pytest-rerunfailures
|
|
, pytestCheckHook
|
|
, pythonOlder
|
|
}:
|
|
|
|
buildPythonPackage rec {
|
|
pname = "mcstatus";
|
|
version = "11.1.0";
|
|
format = "pyproject";
|
|
|
|
disabled = pythonOlder "3.7";
|
|
|
|
src = fetchFromGitHub {
|
|
owner = "py-mine";
|
|
repo = pname;
|
|
rev = "refs/tags/v${version}";
|
|
hash = "sha256-LYhd35FsredNaMgMfkj7LntNK3NRoVpniEUT6WHoXx8=";
|
|
};
|
|
|
|
postPatch = ''
|
|
substituteInPlace pyproject.toml \
|
|
--replace " --cov=mcstatus --cov-append --cov-branch --cov-report=term-missing -vvv --no-cov-on-fail" ""
|
|
'';
|
|
|
|
nativeBuildInputs = [
|
|
poetry-core
|
|
poetry-dynamic-versioning
|
|
];
|
|
|
|
propagatedBuildInputs = [
|
|
asyncio-dgram
|
|
dnspython
|
|
];
|
|
|
|
__darwinAllowLocalNetworking = true;
|
|
|
|
nativeCheckInputs = [
|
|
pytest-asyncio
|
|
pytest-rerunfailures
|
|
pytestCheckHook
|
|
];
|
|
|
|
pythonImportsCheck = [
|
|
"mcstatus"
|
|
];
|
|
|
|
disabledTests = [
|
|
# DNS features are limited in the sandbox
|
|
"test_query"
|
|
"test_query_retry"
|
|
"test_resolve_localhost"
|
|
"test_async_resolve_localhost"
|
|
];
|
|
|
|
meta = with lib; {
|
|
description = "Python library for checking the status of Minecraft servers";
|
|
homepage = "https://github.com/py-mine/mcstatus";
|
|
changelog = "https://github.com/py-mine/mcstatus/releases/tag/v${version}";
|
|
license = with licenses; [ asl20 ];
|
|
maintainers = with maintainers; [ fab ];
|
|
};
|
|
}
|