nixpkgs/pkgs/development/python-modules/mcstatus/default.nix
Fabian Affolter 2ede5166ef
python311Packages.mcstatus: 10.0.3 -> 11.0.0
Diff: py-mine/mcstatus@refs/tags/v10.0.3...v11.0.0

Changelog: https://github.com/py-mine/mcstatus/releases/tag/v11.0.0
2023-08-02 22:42:44 +02:00

68 lines
1.4 KiB
Nix

{ lib
, asyncio-dgram
, buildPythonPackage
, click
, dnspython
, fetchFromGitHub
, poetry-core
, pytest-asyncio
, pytest-rerunfailures
, pytestCheckHook
, pythonOlder
}:
buildPythonPackage rec {
pname = "mcstatus";
version = "11.0.0";
format = "pyproject";
disabled = pythonOlder "3.7";
src = fetchFromGitHub {
owner = "py-mine";
repo = pname;
rev = "refs/tags/v${version}";
hash = "sha256-+r6WL59T9rNAKl3r4Hef75uJoD7DRYA23uS/OlzRyRk=";
};
postPatch = ''
substituteInPlace pyproject.toml \
--replace 'version = "0.0.0"' 'version = "${version}"' \
--replace " --cov=mcstatus --cov-append --cov-branch --cov-report=term-missing -vvv --no-cov-on-fail" ""
'';
nativeBuildInputs = [
poetry-core
];
propagatedBuildInputs = [
asyncio-dgram
click
dnspython
];
nativeCheckInputs = [
pytest-asyncio
pytest-rerunfailures
pytestCheckHook
];
pythonImportsCheck = [
"mcstatus"
];
disabledTests = [
# DNS features are limited in the sandbox
"test_query"
"test_query_retry"
];
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 ];
};
}