Merge pull request #204331 from mweinelt/zigbee2mqtt-1.28.4

This commit is contained in:
Martin Weinelt 2022-12-03 22:27:44 +01:00 committed by GitHub
commit f069b36483
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
5 changed files with 34 additions and 7286 deletions

View File

@ -119,9 +119,8 @@ in
];
SystemCallArchitectures = "native";
SystemCallFilter = [
"@system-service"
"~@privileged"
"~@resources"
"@system-service @pkey"
"~@privileged @resources"
];
UMask = "0077";
};

View File

@ -1,30 +1,45 @@
{ pkgs, stdenv, nixosTests }:
let
package = (import ./node.nix { inherit pkgs; inherit (stdenv.hostPlatform) system; }).package;
in
package.override rec {
version = "1.28.0";
reconstructLock = true;
{ lib
, buildNpmPackage
, fetchFromGitHub
, python3
, nixosTests
, nix-update-script
}:
src = pkgs.fetchFromGitHub {
buildNpmPackage rec {
pname = "zigbee2mqtt";
version = "1.28.4";
src = fetchFromGitHub {
owner = "Koenkk";
repo = "zigbee2mqtt";
rev = version;
sha256 = "0GVU2bjghFdNyXljUGzxO71qhbHMVoO7I4E2c237+mw=";
hash = "sha256-7eyCmgpbcjPrpFHscHTab6xRnL4ABvaYaaVcbUcynT8=";
};
npmDepsHash = "sha256-qQPn2BwXwXyzyPYYRmgIvzJENZ/XKWATcludorlFEZw=";
nativeBuildInputs = [
python3
];
passthru.tests.zigbee2mqtt = nixosTests.zigbee2mqtt;
passthru.updateScript = ./update.sh;
passthru.updateScript = nix-update-script {
attrPath = pname;
};
postInstall = ''
npm run build
'';
meta = with pkgs.lib; {
meta = with lib; {
changelog = "https://github.com/Koenkk/zigbee2mqtt/releases/tag/${version}";
description = "Zigbee to MQTT bridge using zigbee-shepherd";
license = licenses.gpl3;
homepage = "https://github.com/Koenkk/zigbee2mqtt";
maintainers = with maintainers; [ sweber ];
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;
};
}

File diff suppressed because it is too large Load Diff

View File

@ -1,17 +0,0 @@
# This file has been generated by node2nix 1.11.1. Do not edit!
{pkgs ? import <nixpkgs> {
inherit system;
}, system ? builtins.currentSystem, nodejs ? pkgs."nodejs-14_x"}:
let
nodeEnv = import ../../development/node-packages/node-env.nix {
inherit (pkgs) stdenv lib python2 runCommand writeTextFile writeShellScript;
inherit pkgs nodejs;
libtool = if pkgs.stdenv.isDarwin then pkgs.darwin.cctools else null;
};
in
import ./node-packages.nix {
inherit (pkgs) fetchurl nix-gitignore stdenv lib fetchgit;
inherit nodeEnv;
}

View File

@ -1,35 +0,0 @@
#!/usr/bin/env nix-shell
#! nix-shell -i bash -p nodePackages.node2nix curl jq nix-update common-updater-scripts
set -euo pipefail
SCRIPT_DIR="$(dirname "$0")"
cd "$SCRIPT_DIR"
CURRENT_VERSION=$(nix eval -f ../../.. --raw zigbee2mqtt.version)
TARGET_VERSION="$(curl https://api.github.com/repos/Koenkk/zigbee2mqtt/releases/latest | jq -r ".tag_name")"
if [[ "$CURRENT_VERSION" == "$TARGET_VERSION" ]]; then
echo "zigbee2mqtt is up-to-date: ${CURRENT_VERSION}"
exit 0
fi
ZIGBEE2MQTT=https://github.com/Koenkk/zigbee2mqtt/raw/$TARGET_VERSION
curl -LO $ZIGBEE2MQTT/package.json
curl -LO $ZIGBEE2MQTT/package-lock.json
node2nix \
--composition node.nix \
--lock package-lock.json \
--development \
--no-copy-node-env \
--node-env ../../development/node-packages/node-env.nix \
--nodejs-14 \
--output node-packages.nix
rm package.json package-lock.json
(
cd ../../../
update-source-version zigbee2mqtt "$TARGET_VERSION"
)