From 37147ed3d824d1cc7b1022b6dc04a587ca1458b0 Mon Sep 17 00:00:00 2001 From: Fabian Affolter Date: Fri, 19 Feb 2021 15:56:51 +0100 Subject: [PATCH] python3Packages.mcstatus: init at 5.1.1 --- .../python-modules/mcstatus/default.nix | 49 +++++++++++++++++++ pkgs/top-level/python-packages.nix | 2 + 2 files changed, 51 insertions(+) create mode 100644 pkgs/development/python-modules/mcstatus/default.nix 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 { };