nixpkgs/pkgs/servers/zigbee2mqtt/default.nix
Martin Weinelt feb66d6fd8 zigbee2mqtt: convert to buildNpmPackage and adopt
Using buildNpmPackage simplifies the whole package alot and even allows
us to use the generic nix-update-script instead of a bespoke one.
2022-12-03 19:57:50 +01:00

46 lines
1.2 KiB
Nix

{ lib
, buildNpmPackage
, fetchFromGitHub
, python3
, nixosTests
, nix-update-script
}:
buildNpmPackage rec {
pname = "zigbee2mqtt";
version = "1.28.0";
src = fetchFromGitHub {
owner = "Koenkk";
repo = "zigbee2mqtt";
rev = version;
hash = "sha256-0GVU2bjghFdNyXljUGzxO71qhbHMVoO7I4E2c237+mw=";
};
npmDepsHash = "sha256-LcPJtvtnBcPRVrdBWeHr7yznh26NwQpJxJZidX5rHVQ=";
nativeBuildInputs = [
python3
];
passthru.tests.zigbee2mqtt = nixosTests.zigbee2mqtt;
passthru.updateScript = nix-update-script {
attrPath = pname;
};
meta = with lib; {
changelog = "https://github.com/Koenkk/zigbee2mqtt/releases/tag/${version}";
description = "Zigbee to MQTT bridge using zigbee-shepherd";
homepage = "https://github.com/Koenkk/zigbee2mqtt";
license = licenses.gpl3;
longDescription = ''
Allows you to use your Zigbee devices without the vendor's bridge or gateway.
It bridges events and allows you to control your Zigbee devices via MQTT.
In this way you can integrate your Zigbee devices with whatever smart home infrastructure you are using.
'';
maintainers = with maintainers; [ sweber hexa ];
platforms = platforms.linux;
};
}