depot/third_party/nixpkgs/pkgs/development/python-modules/mcstatus/default.nix
Default email bba55970ba Project import generated by Copybara.
GitOrigin-RevId: 3d1a7716d7f1fccbd7d30ab3b2ed3db831f43bde
2021-04-05 17:23:46 +02:00

49 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 ];
};
}