From c5f4f7823940379c67836ad3054197de7df09780 Mon Sep 17 00:00:00 2001 From: Zhong Jianxin Date: Tue, 7 May 2024 20:39:15 +0800 Subject: [PATCH] home-assistant-custom-lovelace-modules.zigbee2mqtt-networkmap: unstable-2023-12-16 -> 0.9.0 Changelog: https://github.com/azuwis/zigbee2mqtt-networkmap/releases/tag/v0.9.0 - Format using nixfmt-rfc-style - Add passthru.updateScript - Add meta.changelog --- .../zigbee2mqtt-networkmap/default.nix | 19 +++++++++++-------- .../zigbee2mqtt-networkmap/update.sh | 9 +++++++++ 2 files changed, 20 insertions(+), 8 deletions(-) create mode 100755 pkgs/servers/home-assistant/custom-lovelace-modules/zigbee2mqtt-networkmap/update.sh diff --git a/pkgs/servers/home-assistant/custom-lovelace-modules/zigbee2mqtt-networkmap/default.nix b/pkgs/servers/home-assistant/custom-lovelace-modules/zigbee2mqtt-networkmap/default.nix index f8e75ede0156..8de17253e000 100644 --- a/pkgs/servers/home-assistant/custom-lovelace-modules/zigbee2mqtt-networkmap/default.nix +++ b/pkgs/servers/home-assistant/custom-lovelace-modules/zigbee2mqtt-networkmap/default.nix @@ -1,25 +1,26 @@ -{ lib -, fetchFromGitHub -, fetchYarnDeps -, mkYarnPackage +{ + lib, + fetchFromGitHub, + fetchYarnDeps, + mkYarnPackage, }: mkYarnPackage rec { pname = "zigbee2mqtt-networkmap"; - version = "unstable-2023-12-16"; + version = "0.9.0"; src = fetchFromGitHub { owner = "azuwis"; repo = "zigbee2mqtt-networkmap"; - rev = "7851357d78ebc0d1cc3cb5c661267a1e8b4c09e3"; - hash = "sha256-x7RVy0stWT6+8f0/0VORVBgGpBbsbyJBC38xIxXhzos="; + rev = "v${version}"; + hash = "sha256-K4DyrurC4AzzJCcB4CS9UlQbUQSWpR7PevA2JFFMRZM="; }; packageJSON = ./package.json; offlineCache = fetchYarnDeps { yarnLock = "${src}/yarn.lock"; - hash = "sha256-s+vnyUeJKkkA5G0AmsfIG0Zh4bYdDc2B5MSNvdwhjgs="; + hash = "sha256-h/5TWaIg8AfY6I/JBRmUF6yCCbxCMs9nRECWEaaK2to="; }; configurePhase = '' @@ -49,8 +50,10 @@ mkYarnPackage rec { doDist = false; passthru.entrypoint = "zigbee2mqtt-networkmap.js"; + passthru.updateScript = ./update.sh; meta = with lib; { + changelog = "https://github.com/azuwis/zigbee2mqtt-networkmap/releases/tag/v${version}"; description = "Home Assistant Custom Card to show Zigbee2mqtt network map"; homepage = "https://github.com/azuwis/zigbee2mqtt-networkmap"; maintainers = with maintainers; [ azuwis ]; diff --git a/pkgs/servers/home-assistant/custom-lovelace-modules/zigbee2mqtt-networkmap/update.sh b/pkgs/servers/home-assistant/custom-lovelace-modules/zigbee2mqtt-networkmap/update.sh new file mode 100755 index 000000000000..b2675bc5c3d9 --- /dev/null +++ b/pkgs/servers/home-assistant/custom-lovelace-modules/zigbee2mqtt-networkmap/update.sh @@ -0,0 +1,9 @@ +#!/usr/bin/env nix-shell +#!nix-shell -i bash -p nix-update + +set -xe + +dirname="$(dirname "$0")" + +# nix-update picks the wrong file `pkgs/development/tools/yarn2nix-moretea/yarn2nix/default.nix` +nix-update --override-filename "$dirname/default.nix" home-assistant-custom-lovelace-modules.zigbee2mqtt-networkmap