2022-12-17 10:02:37 +00:00
|
|
|
{ lib
|
2024-06-05 15:53:02 +00:00
|
|
|
, stdenv
|
2022-12-17 10:02:37 +00:00
|
|
|
, buildNpmPackage
|
|
|
|
, fetchFromGitHub
|
2024-02-07 01:22:34 +00:00
|
|
|
, systemdMinimal
|
2022-12-17 10:02:37 +00:00
|
|
|
, nixosTests
|
|
|
|
, nix-update-script
|
2024-06-05 15:53:02 +00:00
|
|
|
, withSystemd ? lib.meta.availableOn stdenv.hostPlatform systemdMinimal
|
2022-12-17 10:02:37 +00:00
|
|
|
}:
|
2020-08-20 17:08:02 +00:00
|
|
|
|
2022-12-17 10:02:37 +00:00
|
|
|
buildNpmPackage rec {
|
|
|
|
pname = "zigbee2mqtt";
|
2024-06-05 15:53:02 +00:00
|
|
|
version = "1.38.0";
|
2022-12-17 10:02:37 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
2020-08-20 17:08:02 +00:00
|
|
|
owner = "Koenkk";
|
|
|
|
repo = "zigbee2mqtt";
|
|
|
|
rev = version;
|
2024-06-05 15:53:02 +00:00
|
|
|
hash = "sha256-h++IXL1y6f52mSBRP3TiqLMKkFXP/QKaNlpM2PCgT5k=";
|
2020-08-20 17:08:02 +00:00
|
|
|
};
|
|
|
|
|
2024-06-05 15:53:02 +00:00
|
|
|
npmDepsHash = "sha256-OsG9FCdlSQYWrne/jaklNIsCT0M4+vt8DxZ9CGPfbzM=";
|
2022-12-17 10:02:37 +00:00
|
|
|
|
2024-06-05 15:53:02 +00:00
|
|
|
buildInputs = lib.optionals withSystemd [
|
2024-02-07 01:22:34 +00:00
|
|
|
systemdMinimal
|
|
|
|
];
|
|
|
|
|
2024-06-05 15:53:02 +00:00
|
|
|
npmFlags = lib.optionals (!withSystemd) [ "--omit=optional" ];
|
|
|
|
|
2022-12-17 10:02:37 +00:00
|
|
|
passthru.tests.zigbee2mqtt = nixosTests.zigbee2mqtt;
|
2022-12-28 21:21:41 +00:00
|
|
|
passthru.updateScript = nix-update-script { };
|
2021-12-19 01:06:50 +00:00
|
|
|
|
2022-12-17 10:02:37 +00:00
|
|
|
meta = with lib; {
|
|
|
|
changelog = "https://github.com/Koenkk/zigbee2mqtt/releases/tag/${version}";
|
2020-08-20 17:08:02 +00:00
|
|
|
description = "Zigbee to MQTT bridge using zigbee-shepherd";
|
2021-12-06 16:07:01 +00:00
|
|
|
homepage = "https://github.com/Koenkk/zigbee2mqtt";
|
2022-12-17 10:02:37 +00:00
|
|
|
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 ];
|
2024-01-02 11:29:13 +00:00
|
|
|
mainProgram = "zigbee2mqtt";
|
2020-08-20 17:08:02 +00:00
|
|
|
};
|
|
|
|
}
|