diff --git a/pkgs/development/python-modules/mcstatus/default.nix b/pkgs/development/python-modules/mcstatus/default.nix new file mode 100644 index 000000000000..f8ddac600a69 --- /dev/null +++ b/pkgs/development/python-modules/mcstatus/default.nix @@ -0,0 +1,49 @@ +{ 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 ]; + }; +} diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index bdff2fce1522..8c22f1cb5094 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -4006,6 +4006,8 @@ in { mccabe = callPackage ../development/python-modules/mccabe { }; + mcstatus = callPackage ../development/python-modules/mcstatus { }; + MDP = callPackage ../development/python-modules/mdp { }; measurement = callPackage ../development/python-modules/measurement { };