From 097746fec2b60a48c4a12e25717848bf4203761e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Netix=20=28Espinet=20Franc=CC=A7ois=29?= Date: Wed, 13 Feb 2019 21:50:31 +0100 Subject: [PATCH 1/4] maintainers: added netixx --- maintainers/maintainer-list.nix | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/maintainers/maintainer-list.nix b/maintainers/maintainer-list.nix index cc121c15ac8..864b3701f26 100644 --- a/maintainers/maintainer-list.nix +++ b/maintainers/maintainer-list.nix @@ -3228,6 +3228,11 @@ github = "nequissimus"; name = "Tim Steinbach"; }; + netixx = { + email = "dev.espinetfrancois@gmail.com"; + github = "netixx"; + name = "François Espinet"; + }; nikitavoloboev = { email = "nikita.voloboev@gmail.com"; github = "nikitavoloboev"; From 22069991d04a03f3340e415f4eafebc6f3130fa6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Netix=20=28Espinet=20Franc=CC=A7ois=29?= Date: Wed, 13 Feb 2019 20:15:49 +0100 Subject: [PATCH 2/4] pythonPackages.aiolifx: init at 0.6.7 Aiolifx package provides ability to control lifx (https://www.lifx.com) light fixtures using python. The original need was to use it with the home-assistant package, specifically the "lifx" component. --- .../python-modules/aiolifx/default.nix | 31 +++++++++++++++++++ pkgs/top-level/python-packages.nix | 2 ++ 2 files changed, 33 insertions(+) create mode 100644 pkgs/development/python-modules/aiolifx/default.nix diff --git a/pkgs/development/python-modules/aiolifx/default.nix b/pkgs/development/python-modules/aiolifx/default.nix new file mode 100644 index 00000000000..b7855bee72d --- /dev/null +++ b/pkgs/development/python-modules/aiolifx/default.nix @@ -0,0 +1,31 @@ +{ lib +, fetchPypi +, buildPythonPackage +, isPy3k +, ifaddr +, bitstring +}: + +buildPythonPackage rec { + pname = "aiolifx"; + version = "0.6.7"; + + src = fetchPypi { + inherit pname version; + sha256 = "cf53c9faea6eee25a466e73eef1753b82a75c7497648149c19c15342df2678f2"; + }; + + # tests are not implemented + doCheck = false; + + disabled = !isPy3k; + + propagatedBuildInputs = [ bitstring ifaddr ]; + + meta = with lib; { + homepage = http://github.com/frawau/aiolifx; + license = licenses.mit; + description = "API for local communication with LIFX devices over a LAN with asyncio"; + maintainers = with maintainers; [ netixx ]; + }; +} diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index 33b9645a8a1..2abed93a71d 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -168,6 +168,8 @@ in { aioimaplib = callPackage ../development/python-modules/aioimaplib { }; + aiolifx = callPackage ../development/python-modules/aiolifx { }; + aioamqp = callPackage ../development/python-modules/aioamqp { }; ansicolor = callPackage ../development/python-modules/ansicolor { }; From 9b02f5ec4e91ab24dc2e389c2c07f05d9bdc3108 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Netix=20=28Espinet=20Franc=CC=A7ois=29?= Date: Wed, 13 Feb 2019 20:22:39 +0100 Subject: [PATCH 3/4] pythonPackages.aiolifx-effects: init at 0.2.1 Aiolifx_effects package extends the pythonPackages.aiolifx package to provide the ability to program effects (strobe, fade) into lifx light fixtures (https://www.lifx.com) using python. The original need was to use it with the home-assistant package, specifically the "lifx" component. Although not strictly required to control the lights, the lifx compopent imports this package and will fail if it's not present. --- .../aiolifx-effects/default.nix | 31 +++++++++++++++++++ pkgs/top-level/python-packages.nix | 2 ++ 2 files changed, 33 insertions(+) create mode 100644 pkgs/development/python-modules/aiolifx-effects/default.nix diff --git a/pkgs/development/python-modules/aiolifx-effects/default.nix b/pkgs/development/python-modules/aiolifx-effects/default.nix new file mode 100644 index 00000000000..bbe2b538ac5 --- /dev/null +++ b/pkgs/development/python-modules/aiolifx-effects/default.nix @@ -0,0 +1,31 @@ +{ lib +, fetchPypi +, buildPythonPackage +, isPy3k +, aiolifx +}: + +buildPythonPackage rec { + pname = "aiolifx-effects"; + version = "0.2.1"; + + src = fetchPypi { + inherit version; + pname = "aiolifx_effects"; + sha256 = "cb4ac52deeb220783fc6449251cf40833fcffa28648270be64b1b3e83e06b503"; + }; + + # tests are not implemented + doCheck = false; + + disabled = !isPy3k; + + propagatedBuildInputs = [ aiolifx ]; + + meta = with lib; { + homepage = https://github.com/amelchio/aiolifx_effects; + license = licenses.mit; + description = "Light effects (pulse, colorloop ...) for LIFX lights running on aiolifx"; + maintainers = with maintainers; [ netixx ]; + }; +} diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index 2abed93a71d..5c81e74cb8f 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -170,6 +170,8 @@ in { aiolifx = callPackage ../development/python-modules/aiolifx { }; + aiolifx-effects = callPackage ../development/python-modules/aiolifx-effects { }; + aioamqp = callPackage ../development/python-modules/aioamqp { }; ansicolor = callPackage ../development/python-modules/ansicolor { }; From 2d0abff4c18631ea73d61f231a6ce6ea32699cb6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Netix=20=28Espinet=20Franc=CC=A7ois=29?= Date: Thu, 14 Feb 2019 20:25:47 +0100 Subject: [PATCH 4/4] home-assistant: fix dependencies for lifx component Update components dependencies for home-assistant. --- pkgs/servers/home-assistant/component-packages.nix | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/pkgs/servers/home-assistant/component-packages.nix b/pkgs/servers/home-assistant/component-packages.nix index 7e5eb47953e..3b3d997e6aa 100644 --- a/pkgs/servers/home-assistant/component-packages.nix +++ b/pkgs/servers/home-assistant/component-packages.nix @@ -559,7 +559,7 @@ "konnected" = ps: with ps; [ aiohttp-cors ]; "lametric" = ps: with ps; [ ]; "lcn" = ps: with ps; [ ]; - "lifx" = ps: with ps; [ ]; + "lifx" = ps: with ps; [ aiolifx ]; "light" = ps: with ps; [ ]; "light.abode" = ps: with ps; [ ]; "light.ads" = ps: with ps; [ ]; @@ -589,7 +589,7 @@ "light.isy994" = ps: with ps; [ ]; "light.knx" = ps: with ps; [ ]; "light.lcn" = ps: with ps; [ ]; - "light.lifx" = ps: with ps; [ ]; + "light.lifx" = ps: with ps; [ aiolifx aiolifx-effects ]; "light.lifx_legacy" = ps: with ps; [ ]; "light.lightwave" = ps: with ps; [ ]; "light.limitlessled" = ps: with ps; [ limitlessled ]; @@ -1144,7 +1144,7 @@ "sensor.serial" = ps: with ps; [ ]; "sensor.serial_pm" = ps: with ps; [ ]; "sensor.seventeentrack" = ps: with ps; [ ]; - "sensor.shodan" = ps: with ps; [ ]; + "sensor.shodan" = ps: with ps; [ shodan ]; "sensor.sht31" = ps: with ps; [ ]; "sensor.sigfox" = ps: with ps; [ ]; "sensor.simulated" = ps: with ps; [ ];