feat(third_party/python): Vendor broadlink-python using git-subtree

This commit is contained in:
Vincent Ambo 2020-04-25 21:38:42 +01:00
parent 9d94a727b2
commit b597a1c143
2 changed files with 3 additions and 10 deletions

View file

@ -1114,5 +1114,5 @@ def setup(ssid, password, security_mode):
sock = socket.socket(socket.AF_INET, # Internet
socket.SOCK_DGRAM) # UDP
sock.setsockopt(socket.SOL_SOCKET, socket.SO_REUSEADDR, 1)
sock.setsockopt(socket.SOL_SOCKET, socket.SO_BROADCAST, 1)
sock.sendto(payload, ('255.255.255.255', 80))
# sock.setsockopt(socket.SOL_SOCKET, socket.SO_BROADCAST, 1)
sock.sendto(payload, ('192.168.10.1', 80))

View file

@ -0,0 +1,15 @@
# 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 = ./.;
propagatedBuildInputs = [ cryptography ];
}))