diff --git a/pkgs/development/python-modules/asyncio-dgram/default.nix b/pkgs/development/python-modules/asyncio-dgram/default.nix index 14c800f568b..2360d170f38 100644 --- a/pkgs/development/python-modules/asyncio-dgram/default.nix +++ b/pkgs/development/python-modules/asyncio-dgram/default.nix @@ -8,13 +8,13 @@ buildPythonPackage rec { pname = "asyncio-dgram"; - version = "1.1.1"; + version = "1.2.0"; src = fetchFromGitHub { owner = "jsbronder"; repo = pname; rev = "v${version}"; - sha256 = "1zkmjvq47zw2fsbnzhr5mh9rsazx0z1f8m528ash25jrxsza5crm"; + sha256 = "sha256-wgcL/BdNjzitkkaGyRUQbW1uv1enLDnHk30YHClK58o="; }; # OSError: AF_UNIX path too long diff --git a/pkgs/development/python-modules/mcstatus/default.nix b/pkgs/development/python-modules/mcstatus/default.nix new file mode 100644 index 00000000000..f8ddac600a6 --- /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/servers/home-assistant/component-packages.nix b/pkgs/servers/home-assistant/component-packages.nix index 2342a3a9a06..25a1e83de0e 100644 --- a/pkgs/servers/home-assistant/component-packages.nix +++ b/pkgs/servers/home-assistant/component-packages.nix @@ -499,7 +499,7 @@ "mikrotik" = ps: with ps; [ librouteros ]; "mill" = ps: with ps; [ ]; # missing inputs: millheater "min_max" = ps: with ps; [ ]; - "minecraft_server" = ps: with ps; [ aiodns getmac ]; # missing inputs: mcstatus + "minecraft_server" = ps: with ps; [ aiodns getmac mcstatus ]; "minio" = ps: with ps; [ minio ]; "mitemp_bt" = ps: with ps; [ ]; # missing inputs: mitemp_bt "mjpeg" = ps: with ps; [ ]; diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index aa2af88ef4d..c585d389e63 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 { };