zigbee2mqtt_1: drop and return to unversioned attribute

This commit is contained in:
Martin Weinelt 2025-08-11 13:30:29 +02:00
parent febe951bcd
commit 133efe0ba9
No known key found for this signature in database
GPG Key ID: 87C1E9888F856759
6 changed files with 80 additions and 148 deletions

View File

@ -1622,14 +1622,7 @@ in
zenohd = runTest ./zenohd.nix;
zeronet-conservancy = runTest ./zeronet-conservancy.nix;
zfs = handleTest ./zfs.nix { };
zigbee2mqtt_1 = runTest {
imports = [ ./zigbee2mqtt.nix ];
_module.args.package = pkgs.zigbee2mqtt_1;
};
zigbee2mqtt_2 = runTest {
imports = [ ./zigbee2mqtt.nix ];
_module.args.package = pkgs.zigbee2mqtt_2;
};
zigbee2mqtt = runTest ./zigbee2mqtt.nix;
zipline = runTest ./zipline.nix;
zoneminder = runTest ./zoneminder.nix;
zookeeper = runTest ./zookeeper.nix;

View File

@ -1,19 +1,11 @@
{
lib,
package,
pkgs,
...
}:
let
error =
if lib.versionOlder package.version "2" then
"Inappropriate ioctl for device, cannot set"
else
"No valid USB adapter found";
in
{
name = "zigbee2mqtt-${lib.versions.major package.version}.x";
name = "zigbee2mqtt";
nodes.machine = {
systemd.services.dummy-serial = {
wantedBy = [
@ -24,10 +16,7 @@ in
};
};
services.zigbee2mqtt = {
enable = true;
inherit package;
};
services.zigbee2mqtt.enable = true;
systemd.services.zigbee2mqtt.serviceConfig.DevicePolicy = lib.mkForce "auto";
};
@ -36,7 +25,7 @@ in
machine.wait_for_unit("multi-user.target")
machine.wait_until_fails("systemctl status zigbee2mqtt.service")
machine.succeed(
"journalctl -eu zigbee2mqtt | grep '${error}'"
"journalctl -eu zigbee2mqtt | grep 'No valid USB adapter found'"
)
machine.log(machine.succeed("systemd-analyze security zigbee2mqtt.service"))

View File

@ -1 +1,74 @@
{ zigbee2mqtt_2 }: zigbee2mqtt_2
{
lib,
stdenv,
fetchFromGitHub,
nodejs,
npmHooks,
pnpm_9,
systemdMinimal,
nixosTests,
nix-update-script,
withSystemd ? lib.meta.availableOn stdenv.hostPlatform systemdMinimal,
}:
let
pnpm = pnpm_9;
in
stdenv.mkDerivation (finalAttrs: {
pname = "zigbee2mqtt";
version = "2.6.0";
src = fetchFromGitHub {
owner = "Koenkk";
repo = "zigbee2mqtt";
tag = finalAttrs.version;
hash = "sha256-syzrH3hJinAcpdyVlwEevqzi0LZ+gBMvJOXncuafzjE=";
};
pnpmDeps = pnpm.fetchDeps {
inherit (finalAttrs) pname version src;
fetcherVersion = 1;
hash = "sha256-EJgR1xjQJGKBdgJ2BGFiumVwZViXn7GJNa4GPkkscDg=";
};
nativeBuildInputs = [
nodejs
npmHooks.npmInstallHook
pnpm.configHook
];
buildInputs = lib.optionals withSystemd [
systemdMinimal
];
buildPhase = ''
runHook preBuild
pnpm run build
runHook postBuild
'';
dontNpmPrune = true;
passthru.tests.zigbee2mqtt = nixosTests.zigbee2mqtt;
passthru.updateScript = nix-update-script { };
meta = with lib; {
changelog = "https://github.com/Koenkk/zigbee2mqtt/releases/tag/${finalAttrs.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
];
mainProgram = "zigbee2mqtt";
};
})

View File

@ -1,51 +0,0 @@
{
lib,
stdenv,
buildNpmPackage,
fetchFromGitHub,
systemdMinimal,
nixosTests,
nix-update-script,
withSystemd ? lib.meta.availableOn stdenv.hostPlatform systemdMinimal,
}:
buildNpmPackage rec {
pname = "zigbee2mqtt";
version = "1.42.0";
src = fetchFromGitHub {
owner = "Koenkk";
repo = "zigbee2mqtt";
rev = version;
hash = "sha256-/7mZrf3FyIliCzsy6yzVRJYMy4bViphYi81UY43iO98=";
};
npmDepsHash = "sha256-heqTYLC+TQPQ2dc5MrVdvJeNqrygC4tUgkLcfKvlYvE=";
buildInputs = lib.optionals withSystemd [
systemdMinimal
];
npmFlags = lib.optionals (!withSystemd) [ "--omit=optional" ];
passthru.tests.zigbee2mqtt = nixosTests.zigbee2mqtt_1;
passthru.updateScript = nix-update-script { };
meta = {
changelog = "https://github.com/Koenkk/zigbee2mqtt/releases/tag/${version}";
description = "Zigbee to MQTT bridge using zigbee-shepherd";
homepage = "https://github.com/Koenkk/zigbee2mqtt";
license = lib.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 lib.maintainers; [
sweber
hexa
];
mainProgram = "zigbee2mqtt";
};
}

View File

@ -1,74 +0,0 @@
{
lib,
stdenv,
fetchFromGitHub,
nodejs,
npmHooks,
pnpm_9,
systemdMinimal,
nixosTests,
nix-update-script,
withSystemd ? lib.meta.availableOn stdenv.hostPlatform systemdMinimal,
}:
let
pnpm = pnpm_9;
in
stdenv.mkDerivation (finalAttrs: {
pname = "zigbee2mqtt";
version = "2.6.0";
src = fetchFromGitHub {
owner = "Koenkk";
repo = "zigbee2mqtt";
tag = finalAttrs.version;
hash = "sha256-syzrH3hJinAcpdyVlwEevqzi0LZ+gBMvJOXncuafzjE=";
};
pnpmDeps = pnpm.fetchDeps {
inherit (finalAttrs) pname version src;
fetcherVersion = 1;
hash = "sha256-EJgR1xjQJGKBdgJ2BGFiumVwZViXn7GJNa4GPkkscDg=";
};
nativeBuildInputs = [
nodejs
npmHooks.npmInstallHook
pnpm.configHook
];
buildInputs = lib.optionals withSystemd [
systemdMinimal
];
buildPhase = ''
runHook preBuild
pnpm run build
runHook postBuild
'';
dontNpmPrune = true;
passthru.tests.zigbee2mqtt = nixosTests.zigbee2mqtt_2;
passthru.updateScript = nix-update-script { };
meta = with lib; {
changelog = "https://github.com/Koenkk/zigbee2mqtt/releases/tag/${finalAttrs.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
];
mainProgram = "zigbee2mqtt";
};
})

View File

@ -2260,6 +2260,8 @@ mapAliases {
zig_0_9 = throw "zig 0.9 has been removed, upgrade to a newer version instead"; # Added 2025-01-24
zig_0_10 = throw "zig 0.10 has been removed, upgrade to a newer version instead"; # Added 2025-01-24
zig_0_11 = throw "zig 0.11 has been removed, upgrade to a newer version instead"; # Added 2025-04-09
zigbee2mqtt_1 = throw "Zigbee2MQTT 1.x has been removed, upgrade to the unversioned attribute."; # Added 2025-08-11
zigbee2mqtt_2 = zigbee2mqtt; # Added 2025-08-11
zimlib = throw "'zimlib' has been removed because it was an outdated and unused version of 'libzim'"; # Added 2025-03-07
zinc = zincsearch; # Added 2023-05-28
zint = zint-qt; # Added 2025-05-15