50 lines
934 B
Nix
50 lines
934 B
Nix
{ lib
|
|
, asyncio-dgram
|
|
, buildPythonPackage
|
|
, click
|
|
, dnspython
|
|
, fetchFromGitHub
|
|
, mock
|
|
, pytestCheckHook
|
|
, pythonOlder
|
|
, six
|
|
}:
|
|
|
|
buildPythonPackage rec {
|
|
pname = "mcstatus";
|
|
version = "5.1.2";
|
|
disabled = pythonOlder "3.6";
|
|
|
|
src = fetchFromGitHub {
|
|
owner = "Dinnerbone";
|
|
repo = pname;
|
|
rev = "release-${version}";
|
|
sha256 = "16k5vcqpd9r7mm1cg9khzba42rcxs491h8gk2klymav249yzrwk7";
|
|
};
|
|
|
|
propagatedBuildInputs = [
|
|
asyncio-dgram
|
|
click
|
|
dnspython
|
|
six
|
|
];
|
|
|
|
checkInputs = [
|
|
mock
|
|
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 ];
|
|
};
|
|
}
|