diff --git a/pkgs/development/python-modules/agent-py/default.nix b/pkgs/development/python-modules/agent-py/default.nix new file mode 100644 index 00000000000..2a9e358cf04 --- /dev/null +++ b/pkgs/development/python-modules/agent-py/default.nix @@ -0,0 +1,26 @@ +{ aiohttp, buildPythonPackage, fetchPypi, isPy3k, lib, python, requests }: + +buildPythonPackage rec { + pname = "agent-py"; + version = "0.0.23"; + + disabled = !isPy3k; + + src = fetchPypi { + inherit pname version; + sha256 = "1hx88m8b8kfb2gm6hii5ldjv7hlvqf99cz0w2vj0d0grrxcbn5cz"; + }; + + propagatedBuildInputs = [ requests aiohttp ]; + + checkPhase = '' + ${python.interpreter} tests/test_agent.py + ''; + + meta = with lib; { + description = "A python wrapper around the Agent REST API."; + homepage = "https://github.com/ispysoftware/agent-py"; + license = licenses.asl20; + maintainers = with maintainers; [ jamiemagee ]; + }; +} diff --git a/pkgs/servers/home-assistant/component-packages.nix b/pkgs/servers/home-assistant/component-packages.nix index 4cf5b0a5634..e02c64f6883 100644 --- a/pkgs/servers/home-assistant/component-packages.nix +++ b/pkgs/servers/home-assistant/component-packages.nix @@ -13,7 +13,7 @@ "ads" = ps: with ps; [ pyads ]; "advantage_air" = ps: with ps; [ advantage-air ]; "aftership" = ps: with ps; [ pyaftership ]; - "agent_dvr" = ps: with ps; [ ]; # missing inputs: agent-py + "agent_dvr" = ps: with ps; [ agent-py ]; "air_quality" = ps: with ps; [ ]; "airly" = ps: with ps; [ airly ]; "airvisual" = ps: with ps; [ pyairvisual ]; diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index 368f21d1289..2076ae2ec54 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -196,6 +196,8 @@ in { agate-sql = callPackage ../development/python-modules/agate-sql { }; + agent-py = callPackage ../development/python-modules/agent-py { }; + aioamqp = callPackage ../development/python-modules/aioamqp { }; aioconsole = callPackage ../development/python-modules/aioconsole { };