depot/third_party/nixpkgs/pkgs/development/python-modules/mcstatus/default.nix
Default email 86f042a55b Project import generated by Copybara.
GitOrigin-RevId: c7d0dbe094c988209edac801eb2a0cc21aa498d8
2021-02-22 21:28:39 +00:00

49 lines
934 B
Nix

{ lib
, asyncio-dgram
, buildPythonPackage
, click
, dnspython
, fetchFromGitHub
, mock
, pytestCheckHook
, pythonOlder
, six
}:
buildPythonPackage rec {
pname = "mcstatus";
version = "5.1.1";
disabled = pythonOlder "3.6";
src = fetchFromGitHub {
owner = "Dinnerbone";
repo = pname;
rev = "release-${version}";
sha256 = "1a3qrl6w76ayqkl1knaz5ai0brrzpjfdk33lyb1n1p7gnc73nhlr";
};
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 ];
};
}