diff --git a/pkgs/development/python-modules/python-nest/default.nix b/pkgs/development/python-modules/python-nest/default.nix new file mode 100644 index 00000000000..c894654e41e --- /dev/null +++ b/pkgs/development/python-modules/python-nest/default.nix @@ -0,0 +1,25 @@ +{ buildPythonPackage, fetchPypi, lib, python, python-dateutil, requests +, six, sseclient-py }: + +buildPythonPackage rec { + pname = "python-nest"; + version = "4.1.0"; + + src = fetchPypi { + inherit pname version; + sha256 = "12iyypbl92ybh8w1bf4z0c2g0sb9id2c07c89vzvnlxgjylw3wbi"; + }; + + propagatedBuildInputs = [ python-dateutil requests six sseclient-py ]; + # has no tests + doCheck = false; + pythonImportsCheck = [ "nest" ]; + + meta = with lib; { + description = + "Python API and command line tool for talking to the Nestâ„¢ Thermostat"; + homepage = "https://github.com/jkoelker/python-nest"; + license = licenses.cc-by-nc-sa-40; + maintainers = with maintainers; [ jamiemagee ]; + }; +} diff --git a/pkgs/development/python-modules/sseclient-py/default.nix b/pkgs/development/python-modules/sseclient-py/default.nix new file mode 100644 index 00000000000..05c3fc80746 --- /dev/null +++ b/pkgs/development/python-modules/sseclient-py/default.nix @@ -0,0 +1,25 @@ +{ buildPythonPackage, fetchFromGitHub, lib, python }: + +buildPythonPackage rec { + pname = "sseclient-py"; + version = "1.7"; + + src = fetchFromGitHub { + owner = "mpetazzoni"; + repo = "sseclient"; + rev = "sseclient-py-${version}"; + sha256 = "0iar4w8gryhjzqwy5k95q9gsv6xpmnwxkpz33418nw8hxlp86wfl"; + }; + + # based on tox.ini + checkPhase = '' + ${python.interpreter} tests/unittests.py + ''; + + meta = with lib; { + description = "Pure-Python Server Side Events (SSE) client"; + homepage = "https://github.com/mpetazzoni/sseclient"; + 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 cd58c6fb103..f63a191fe49 100644 --- a/pkgs/servers/home-assistant/component-packages.nix +++ b/pkgs/servers/home-assistant/component-packages.nix @@ -526,7 +526,7 @@ "nederlandse_spoorwegen" = ps: with ps; [ ]; # missing inputs: nsapi "nello" = ps: with ps; [ ]; # missing inputs: pynello "ness_alarm" = ps: with ps; [ ]; # missing inputs: nessclient - "nest" = ps: with ps; [ ]; # missing inputs: python-nest + "nest" = ps: with ps; [ python-nest ]; "netatmo" = ps: with ps; [ aiohttp-cors hass-nabucasa pyatmo ]; "netdata" = ps: with ps; [ ]; # missing inputs: netdata "netgear" = ps: with ps; [ ]; # missing inputs: pynetgear diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index 9082d90bba5..67fe27f7dad 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -5764,6 +5764,8 @@ in { python-multipart = callPackage ../development/python-modules/python-multipart { }; + python-nest = callPackage ../development/python-modules/python-nest { }; + pythonnet = callPackage ../development/python-modules/pythonnet { # `mono >= 4.6` required to prevent crashes encountered with earlier versions. mono = pkgs.mono4; @@ -6770,6 +6772,8 @@ in { sseclient = callPackage ../development/python-modules/sseclient { }; + sseclient-py = callPackage ../development/python-modules/sseclient-py { }; + sshpubkeys = callPackage ../development/python-modules/sshpubkeys { }; sshtunnel = callPackage ../development/python-modules/sshtunnel { };