diff --git a/pkgs/development/python-modules/moonraker-api/default.nix b/pkgs/development/python-modules/moonraker-api/default.nix new file mode 100644 index 000000000000..ac991e25f41d --- /dev/null +++ b/pkgs/development/python-modules/moonraker-api/default.nix @@ -0,0 +1,43 @@ +{ lib +, aiohttp +, buildPythonPackage +, fetchFromGitHub +, pytest-aiohttp +, pytestCheckHook +, pythonOlder +}: + +buildPythonPackage rec { + pname = "moonraker-api"; + version = "2.0.2"; + format = "setuptools"; + + disabled = pythonOlder "3.8"; + + src = fetchFromGitHub { + owner = "cmroche"; + repo = pname; + rev = "v${version}"; + sha256 = "1ODfwuO8XeleOnpp/dD+8jfEAIesXT1BuImtXTn289U="; + }; + + propagatedBuildInputs = [ + aiohttp + ]; + + checkInputs = [ + pytest-aiohttp + pytestCheckHook + ]; + + pythonImportsCheck = [ + "moonraker_api" + ]; + + meta = with lib; { + description = "Python API for the Moonraker API"; + homepage = "https://github.com/cmroche/moonraker-api"; + license = with licenses; [ gpl3Only ]; + maintainers = with maintainers; [ fab ]; + }; +} diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index 2f415e50f96f..fc14e60dbb84 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -4914,6 +4914,8 @@ in { monty = callPackage ../development/python-modules/monty { }; + moonraker-api = callPackage ../development/python-modules/moonraker-api { }; + more-itertools = callPackage ../development/python-modules/more-itertools { }; moretools = callPackage ../development/python-modules/moretools { };