2021-02-19 14:56:51 +00:00
|
|
|
{ lib
|
|
|
|
, asyncio-dgram
|
|
|
|
, buildPythonPackage
|
|
|
|
, click
|
|
|
|
, dnspython
|
|
|
|
, fetchFromGitHub
|
|
|
|
, mock
|
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";
|
2021-04-14 23:24:48 +01:00
|
|
|
version = "5.1.4";
|
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}";
|
|
|
|
sha256 = "1k8hjv965svbm95m7jaawlhdbxqpkjchlwvjwn1n7z90dfgn5kih";
|
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
|
|
|
|
];
|
|
|
|
|
|
|
|
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 ];
|
|
|
|
};
|
|
|
|
}
|