Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)
at python-updates 40 lines 996 B view raw
1{ 2 lib, 3 python3Packages, 4 fetchFromGitHub, 5}: 6 7python3Packages.buildPythonApplication rec { 8 pname = "broadlink-cli"; 9 version = "0.19.0"; 10 11 # the tools are available as part of the source distribution from GH but 12 # not pypi, so we have to fetch them here. 13 src = fetchFromGitHub { 14 owner = "mjg59"; 15 repo = "python-broadlink"; 16 tag = version; 17 sha256 = "sha256-fqhi4K8Ceh8Rs0ExteCfAuVfEamFjMCjCFm6DRAJDmI="; 18 }; 19 20 format = "other"; 21 22 propagatedBuildInputs = with python3Packages; [ 23 broadlink 24 ]; 25 26 installPhase = '' 27 runHook preInstall 28 29 install -Dm555 -t $out/bin cli/broadlink_{cli,discovery} 30 install -Dm444 -t $out/share/doc/broadlink cli/README.md 31 32 runHook postInstall 33 ''; 34 35 meta = with lib; { 36 description = "Tools for interfacing with Broadlink RM2/3 (Pro) remote controls, A1 sensor platforms and SP2/3 smartplugs"; 37 maintainers = with maintainers; [ peterhoeg ]; 38 inherit (python3Packages.broadlink.meta) homepage license; 39 }; 40}