2021-02-19 14:56:51 +00:00
|
|
|
{ lib
|
|
|
|
, asyncio-dgram
|
|
|
|
, buildPythonPackage
|
|
|
|
, click
|
|
|
|
, dnspython
|
|
|
|
, fetchFromGitHub
|
|
|
|
, mock
|
2021-12-09 08:19:29 +00:00
|
|
|
, poetry-core
|
2021-04-14 23:24:48 +01:00
|
|
|
, pytest-asyncio
|
2021-02-19 14:56:51 +00:00
|
|
|
, pytestCheckHook
|
|
|
|
, pythonOlder
|
|
|
|
, six
|
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "mcstatus";
|
2022-01-03 13:03:29 +00:00
|
|
|
version = "8.0.0";
|
2021-12-09 08:19:29 +00:00
|
|
|
format = "pyproject";
|
|
|
|
|
2021-02-19 14:56:51 +00:00
|
|
|
disabled = pythonOlder "3.6";
|
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "Dinnerbone";
|
|
|
|
repo = pname;
|
2021-04-14 23:24:48 +01:00
|
|
|
rev = "v${version}";
|
2022-01-03 13:03:29 +00:00
|
|
|
sha256 = "sha256-19VO5L5abVGm5zEMt88o67ArLjBCnGO2DxfAD+u1hF4=";
|
2021-02-19 14:56:51 +00:00
|
|
|
};
|
|
|
|
|
2021-12-09 08:19:29 +00:00
|
|
|
nativeBuildInputs = [
|
|
|
|
poetry-core
|
|
|
|
];
|
|
|
|
|
2021-02-19 14:56:51 +00:00
|
|
|
propagatedBuildInputs = [
|
|
|
|
asyncio-dgram
|
|
|
|
click
|
|
|
|
dnspython
|
|
|
|
six
|
|
|
|
];
|
|
|
|
|
|
|
|
checkInputs = [
|
|
|
|
mock
|
2021-04-14 23:24:48 +01:00
|
|
|
pytest-asyncio
|
2021-02-19 14:56:51 +00:00
|
|
|
pytestCheckHook
|
|
|
|
];
|
|
|
|
|
2021-12-09 08:19:29 +00:00
|
|
|
postPatch = ''
|
|
|
|
substituteInPlace pyproject.toml \
|
|
|
|
--replace 'asyncio-dgram = "1.2.0"' 'asyncio-dgram = ">=1.2.0"' \
|
|
|
|
--replace 'six = "1.14.0"' 'six = ">=1.14.0"' \
|
|
|
|
--replace 'click = "7.1.2"' 'click = ">=7.1.2"'
|
|
|
|
'';
|
|
|
|
|
|
|
|
pythonImportsCheck = [
|
|
|
|
"mcstatus"
|
|
|
|
];
|
2021-02-19 14:56:51 +00:00
|
|
|
|
|
|
|
meta = with lib; {
|
|
|
|
description = "Python library for checking the status of Minecraft servers";
|
|
|
|
homepage = "https://github.com/Dinnerbone/mcstatus";
|
|
|
|
license = with licenses; [ asl20 ];
|
|
|
|
maintainers = with maintainers; [ fab ];
|
|
|
|
};
|
|
|
|
}
|