at 23.05-pre 1.0 kB view raw
1{ lib, python3Packages, fetchFromGitHub }: 2 3python3Packages.buildPythonApplication rec { 4 pname = "broadlink-cli"; 5 version = "0.18.2"; 6 7 # the tools are available as part of the source distribution from GH but 8 # not pypi, so we have to fetch them here. 9 src = fetchFromGitHub { 10 owner = "mjg59"; 11 repo = "python-broadlink"; 12 rev = "refs/tags/${version}"; 13 sha256 = "sha256-JX+Io5EP1OgtP7T+UQtkfCPWE1rd3MTrCYRhU9C0+0c="; 14 }; 15 16 format = "other"; 17 18 propagatedBuildInputs = with python3Packages; [ 19 broadlink 20 ]; 21 22 installPhase = '' 23 runHook preInstall 24 25 install -Dm555 -t $out/bin cli/broadlink_{cli,discovery} 26 install -Dm444 -t $out/share/doc/broadlink cli/README.md 27 28 runHook postInstall 29 ''; 30 31 meta = with lib; { 32 description = "Tools for interfacing with Broadlink RM2/3 (Pro) remote controls, A1 sensor platforms and SP2/3 smartplugs"; 33 maintainers = with maintainers; [ peterhoeg ]; 34 inherit (python3Packages.broadlink.meta) homepage license; 35 }; 36}