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-06-04 10:59:45 +01:00
|
|
|
version = "6.0.0";
|
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}";
|
2021-06-04 10:59:45 +01:00
|
|
|
sha256 = "sha256-YBtVWcOZDt2jQB9bHDrSCP9f2OC+IHzJKlBBGorLnZU=";
|
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 ];
|
|
|
|
};
|
|
|
|
}
|