about summary refs log tree commit diff
diff options
context:
space:
mode:
authorJörg Thalheim <Mic92@users.noreply.github.com>2020-03-31 11:46:04 +0100
committerGitHub <noreply@github.com>2020-03-31 11:46:04 +0100
commit5371ea97026e387aff1e467d190777a3af9f2810 (patch)
tree56297abc67017b166409deb027d601a4ecb5e972
parent61cee883a933a9c53c0f38a21fdf73c891506eaf (diff)
parent9a9f28bc094f9bc3761f6c978ab4b3d15f018fa7 (diff)
Merge pull request #83582 from colemickens/nixpkgs-ha-pkgs-roku
pythonPackages.roku: init at v4.1
-rw-r--r--.gitignore1
-rw-r--r--pkgs/development/python-modules/roku/default.nix26
-rw-r--r--pkgs/servers/home-assistant/component-packages.nix2
-rw-r--r--pkgs/top-level/python-packages.nix2
4 files changed, 30 insertions, 1 deletions
diff --git a/.gitignore b/.gitignore
index b3ae9e6ea863d..ca00bc4df5740 100644
--- a/.gitignore
+++ b/.gitignore
@@ -11,6 +11,7 @@ result-*
 .version-suffix
 
 .DS_Store
+.mypy_cache
 
 /pkgs/development/libraries/qt-5/*/tmp/
 /pkgs/desktops/kde-5/*/tmp/
diff --git a/pkgs/development/python-modules/roku/default.nix b/pkgs/development/python-modules/roku/default.nix
new file mode 100644
index 0000000000000..6cdfa2aa15b1a
--- /dev/null
+++ b/pkgs/development/python-modules/roku/default.nix
@@ -0,0 +1,26 @@
+{ stdenv, fetchFromGitHub, buildPythonPackage, requests, pytest, flask, isPy27
+}:
+
+buildPythonPackage rec {
+  version = "4.1";
+  pname = "roku";
+  disabled = isPy27;
+
+  src = fetchFromGitHub {
+    owner = "jcarbaugh";
+    repo = "python-roku";
+    rev = "v${version}";
+    sha256 = "09mq59kjll7gj1srw4qc921ncsm7cld95sbz5v3p2bwmgckpqza7";
+  };
+
+  propagatedBuildInputs = [ requests ];
+
+  checkInputs = [ pytest flask ];
+  pythonImportsCheck = [ "roku" ];
+
+  meta = with stdenv.lib; {
+    description = "Screw remotes. Control your Roku with Python.";
+    homepage = "https://github.com/jcarbaugh/python-roku";
+    license = licenses.bsd3;
+  };
+}
diff --git a/pkgs/servers/home-assistant/component-packages.nix b/pkgs/servers/home-assistant/component-packages.nix
index 070e7238bc6a6..0b2aa999f7279 100644
--- a/pkgs/servers/home-assistant/component-packages.nix
+++ b/pkgs/servers/home-assistant/component-packages.nix
@@ -640,7 +640,7 @@
     "ripple" = ps: with ps; [ ]; # missing inputs: python-ripple-api
     "rmvtransport" = ps: with ps; [ ]; # missing inputs: PyRMVtransport
     "rocketchat" = ps: with ps; [ ]; # missing inputs: rocketchat-API
-    "roku" = ps: with ps; [ ]; # missing inputs: roku
+    "roku" = ps: with ps; [ roku];
     "roomba" = ps: with ps; [ ]; # missing inputs: roombapy
     "route53" = ps: with ps; [ boto3]; # missing inputs: ipify
     "rova" = ps: with ps; [ ]; # missing inputs: rova
diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix
index 53d243055c489..1a412e6792107 100644
--- a/pkgs/top-level/python-packages.nix
+++ b/pkgs/top-level/python-packages.nix
@@ -3301,6 +3301,8 @@ in {
 
   rethinkdb = callPackage ../development/python-modules/rethinkdb { };
 
+  roku = callPackage ../development/python-modules/roku { };
+
   roman = callPackage ../development/python-modules/roman { };
 
   rotate-backups = callPackage ../tools/backup/rotate-backups { };