2021-02-19 14:56:51 +00:00
|
|
|
{ lib
|
|
|
|
, asyncio-dgram
|
|
|
|
, buildPythonPackage
|
|
|
|
, click
|
|
|
|
, dnspython
|
|
|
|
, fetchFromGitHub
|
|
|
|
, mock
|
2021-04-14 22:24:48 +00:00
|
|
|
, pytest-asyncio
|
2021-02-19 14:56:51 +00:00
|
|
|
, pytestCheckHook
|
|
|
|
, pythonOlder
|
|
|
|
, six
|
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "mcstatus";
|
2021-05-06 20:28:19 +00:00
|
|
|
version = "5.2.0";
|
2021-02-19 14:56:51 +00:00
|
|
|
disabled = pythonOlder "3.6";
|
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "Dinnerbone";
|
|
|
|
repo = pname;
|
2021-04-14 22:24:48 +00:00
|
|
|
rev = "v${version}";
|
2021-05-06 20:28:19 +00:00
|
|
|
sha256 = "sha256-RlqzeixaHgyIl/7mMRkZAEsqJEP79Bz1bDGAU8PIetU=";
|
2021-02-19 14:56:51 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
propagatedBuildInputs = [
|
|
|
|
asyncio-dgram
|
|
|
|
click
|
|
|
|
dnspython
|
|
|
|
six
|
|
|
|
];
|
|
|
|
|
|
|
|
checkInputs = [
|
|
|
|
mock
|
2021-04-14 22:24:48 +00:00
|
|
|
pytest-asyncio
|
2021-02-19 14:56:51 +00:00
|
|
|
pytestCheckHook
|
|
|
|
];
|
|
|
|
|
|
|
|
postPatch = ''
|
|
|
|
substituteInPlace requirements.txt --replace "dnspython3" "dnspython"
|
|
|
|
'';
|
|
|
|
|
|
|
|
pythonImportsCheck = [ "mcstatus" ];
|
|
|
|
|
|
|
|
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 ];
|
|
|
|
};
|
|
|
|
}
|