46 lines
1.3 KiB
Nix
46 lines
1.3 KiB
Nix
{
|
|
lib,
|
|
rustPlatform,
|
|
buildPythonPackage,
|
|
maturin,
|
|
fetchFromGitHub,
|
|
}:
|
|
|
|
buildPythonPackage rec {
|
|
pname = "tapo";
|
|
version = "0.8.8";
|
|
pyproject = true;
|
|
|
|
src = fetchFromGitHub {
|
|
owner = "mihai-dinculescu";
|
|
repo = "tapo";
|
|
rev = "v${version}";
|
|
hash = "sha256-cVrD2XfS3Oum0DL9DYQfnNN6WKyjSiy94Vj+sUMmbcc=";
|
|
};
|
|
|
|
nativeBuildInputs = [
|
|
rustPlatform.cargoSetupHook
|
|
rustPlatform.maturinBuildHook
|
|
];
|
|
|
|
sourceRoot = "${src.name}/tapo-py";
|
|
cargoRoot = "../";
|
|
|
|
env = {
|
|
CARGO_TARGET_DIR = "./target";
|
|
};
|
|
|
|
cargoDeps = rustPlatform.fetchCargoVendor {
|
|
inherit pname version src;
|
|
hash = "sha256-Klr3rx1zYcul1gPz6H+d5idHlNJQB3SuY5nZlXwHFmY=";
|
|
};
|
|
|
|
meta = {
|
|
description = "Unofficial Tapo API Client. Works with TP-Link Tapo smart devices. Tested with light bulbs (L510, L520, L530, L535, L610, L630), light strips (L900, L920, L930), plugs (P100, P105, P110, P110M, P115), power strips (P300, P304M, P316M), hubs (H100), switches (S200B) and sensors (KE100, T100, T110, T300, T310, T315";
|
|
homepage = "https://github.com/mihai-dinculescu/tapo";
|
|
changelog = "https://github.com/mihai-dinculescu/tapo/blob/${src.rev}/CHANGELOG.md";
|
|
license = lib.licenses.mit;
|
|
maintainers = with lib.maintainers; [ ];
|
|
mainProgram = "tapo";
|
|
};
|
|
}
|