summary refs log tree commit diff
diff options
context:
space:
mode:
authorMarco Orovecchia <marco@orovecchia.at>2020-03-19 21:00:04 +0100
committerJon <jonringer@users.noreply.github.com>2020-04-10 01:06:23 -0700
commit6fcf77e87a71bfdf70c158ac9b820deda23701e9 (patch)
tree3937fa2774d2a8a9f68dcecd013159f257517fb0
parent376c25ab12612830f335d8751270ddd46779b785 (diff)
downloadnixpkgs-6fcf77e87a71bfdf70c158ac9b820deda23701e9.tar
nixpkgs-6fcf77e87a71bfdf70c158ac9b820deda23701e9.tar.gz
nixpkgs-6fcf77e87a71bfdf70c158ac9b820deda23701e9.tar.bz2
nixpkgs-6fcf77e87a71bfdf70c158ac9b820deda23701e9.tar.lz
nixpkgs-6fcf77e87a71bfdf70c158ac9b820deda23701e9.tar.xz
nixpkgs-6fcf77e87a71bfdf70c158ac9b820deda23701e9.tar.zst
nixpkgs-6fcf77e87a71bfdf70c158ac9b820deda23701e9.zip
pythonPackages.pynanoleaf: init at 0.0.5
-rw-r--r--pkgs/development/python-modules/pynanoleaf/default.nix29
-rw-r--r--pkgs/servers/home-assistant/component-packages.nix2
-rw-r--r--pkgs/top-level/python-packages.nix2
3 files changed, 32 insertions, 1 deletions
diff --git a/pkgs/development/python-modules/pynanoleaf/default.nix b/pkgs/development/python-modules/pynanoleaf/default.nix
new file mode 100644
index 00000000000..40e2783aa57
--- /dev/null
+++ b/pkgs/development/python-modules/pynanoleaf/default.nix
@@ -0,0 +1,29 @@
+{ lib, buildPythonPackage, fetchPypi, isPy3k, requests }:
+
+buildPythonPackage rec {
+  pname = "pynanoleaf";
+  version = "0.0.5";
+
+  src = fetchPypi {
+    inherit pname version;
+    sha256 = "2ced000e3c37f4e2ce0ea177d924af71c97007de9e4fd0ef37dcd7b4a6d1b622";
+  };
+
+  disabled = !isPy3k;
+
+  propagatedBuildInputs = [ requests ];
+
+  # pynanoleaf does not contain tests
+  doCheck = false;
+
+  pythonImportsCheck = [
+    "pynanoleaf"
+  ];
+
+  meta = with lib; {
+    homepage = "https://github.com/Oro/pynanoleaf";
+    description = "A Python3 wrapper for the Nanoleaf API, capable of controlling both Nanoleaf Aurora and Nanoleaf Canvas";
+    license = licenses.mit;
+    maintainers = with maintainers; [ oro ];
+  };
+}
diff --git a/pkgs/servers/home-assistant/component-packages.nix b/pkgs/servers/home-assistant/component-packages.nix
index d383bc38109..8cf5f5a3755 100644
--- a/pkgs/servers/home-assistant/component-packages.nix
+++ b/pkgs/servers/home-assistant/component-packages.nix
@@ -500,7 +500,7 @@
     "n26" = ps: with ps; [ ]; # missing inputs: n26
     "nad" = ps: with ps; [ ]; # missing inputs: nad_receiver
     "namecheapdns" = ps: with ps; [ defusedxml];
-    "nanoleaf" = ps: with ps; [ ]; # missing inputs: pynanoleaf
+    "nanoleaf" = ps: with ps; [ pynanoleaf];
     "neato" = ps: with ps; [ pybotvac];
     "nederlandse_spoorwegen" = ps: with ps; [ ]; # missing inputs: nsapi
     "nello" = ps: with ps; [ ]; # missing inputs: pynello
diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix
index 6ab2ada43a7..e16cc830fc2 100644
--- a/pkgs/top-level/python-packages.nix
+++ b/pkgs/top-level/python-packages.nix
@@ -1214,6 +1214,8 @@ in {
 
   pymsgbox = callPackage ../development/python-modules/pymsgbox { };
 
+  pynanoleaf = callPackage ../development/python-modules/pynanoleaf { };
+
   pynisher = callPackage ../development/python-modules/pynisher { };
 
   pyparser = callPackage ../development/python-modules/pyparser { };