mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-12-23 14:13:35 +00:00
52 lines
962 B
Nix
52 lines
962 B
Nix
{ lib
|
|
, asyncio-dgram
|
|
, buildPythonPackage
|
|
, click
|
|
, dnspython
|
|
, fetchFromGitHub
|
|
, mock
|
|
, pytest-asyncio
|
|
, pytestCheckHook
|
|
, pythonOlder
|
|
, six
|
|
}:
|
|
|
|
buildPythonPackage rec {
|
|
pname = "mcstatus";
|
|
version = "5.2.0";
|
|
disabled = pythonOlder "3.6";
|
|
|
|
src = fetchFromGitHub {
|
|
owner = "Dinnerbone";
|
|
repo = pname;
|
|
rev = "v${version}";
|
|
sha256 = "sha256-RlqzeixaHgyIl/7mMRkZAEsqJEP79Bz1bDGAU8PIetU=";
|
|
};
|
|
|
|
propagatedBuildInputs = [
|
|
asyncio-dgram
|
|
click
|
|
dnspython
|
|
six
|
|
];
|
|
|
|
checkInputs = [
|
|
mock
|
|
pytest-asyncio
|
|
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 ];
|
|
};
|
|
}
|