about summary refs log tree commit diff
path: root/third_party/python
diff options
context:
space:
mode:
authorVincent Ambo <tazjin@google.com>2020-04-25T16·57+0100
committerVincent Ambo <tazjin@google.com>2020-04-25T16·58+0100
commit4deb439d2eea2660cf60fc6639581e43fcb5aa77 (patch)
treee5e77ae783fdea7164f30753281c19d28ec3fef9 /third_party/python
parent1af9a8eb53af05cd17c472000defb34addcb568a (diff)
feat(third_party/python): Package broadlink infrared library r/678
Diffstat (limited to 'third_party/python')
-rw-r--r--third_party/python/broadlink.nix22
1 files changed, 22 insertions, 0 deletions
diff --git a/third_party/python/broadlink.nix b/third_party/python/broadlink.nix
new file mode 100644
index 000000000000..75db1ef2b7af
--- /dev/null
+++ b/third_party/python/broadlink.nix
@@ -0,0 +1,22 @@
+# Python package for controlling the Broadlink RM Pro Infrared
+# controller.
+#
+# https://github.com/mjg59/python-broadlink
+{ pkgs, lib, ... }:
+
+let
+  inherit (pkgs) fetchFromGitHub;
+  inherit (pkgs.python3Packages) buildPythonPackage cryptography;
+in buildPythonPackage (lib.fix (self: {
+  pname = "python-broadlink";
+  version = "0.13.2";
+
+  src = fetchFromGitHub {
+    owner = "mjg59";
+    repo = "python-broadlink";
+    rev = self.version;
+    sha256 = "0dwqzx294sjdc8dg1sd3z6mhll0zzsb8k0lzs63nyhm2nc9pyv6j";
+  };
+
+  propagatedBuildInputs = [ cryptography ];
+}))