diff options
author | Zhong Jianxin <azuwis@gmail.com> | 2023-12-07 19:29:43 +0800 |
---|---|---|
committer | Martin Weinelt <mweinelt@users.noreply.github.com> | 2023-12-07 17:57:25 +0100 |
commit | 42da68c40fb677791c10b1fff8f8febc87bba88e (patch) | |
tree | 024321c9525f667e8bfc4a099a62d79ca821060e /pkgs/servers/home-assistant | |
parent | 02dab4ab5ce6cc7a03736f3937650a161f5b3ae4 (diff) | |
download | nixlib-42da68c40fb677791c10b1fff8f8febc87bba88e.tar nixlib-42da68c40fb677791c10b1fff8f8febc87bba88e.tar.gz nixlib-42da68c40fb677791c10b1fff8f8febc87bba88e.tar.bz2 nixlib-42da68c40fb677791c10b1fff8f8febc87bba88e.tar.lz nixlib-42da68c40fb677791c10b1fff8f8febc87bba88e.tar.xz nixlib-42da68c40fb677791c10b1fff8f8febc87bba88e.tar.zst nixlib-42da68c40fb677791c10b1fff8f8febc87bba88e.zip |
home-assistant-custom-lovelace-modules.zigbee2mqtt-networkmap: init at unstable-2023-12-06
Diffstat (limited to 'pkgs/servers/home-assistant')
3 files changed, 86 insertions, 0 deletions
diff --git a/pkgs/servers/home-assistant/custom-lovelace-modules/default.nix b/pkgs/servers/home-assistant/custom-lovelace-modules/default.nix index 848e6062451a..38bfeed576d4 100644 --- a/pkgs/servers/home-assistant/custom-lovelace-modules/default.nix +++ b/pkgs/servers/home-assistant/custom-lovelace-modules/default.nix @@ -7,4 +7,6 @@ mini-graph-card = callPackage ./mini-graph-card {}; mini-media-player = callPackage ./mini-media-player {}; + + zigbee2mqtt-networkmap = callPackage ./zigbee2mqtt-networkmap { }; } 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 new file mode 100644 index 000000000000..ef412801bfe9 --- /dev/null +++ b/pkgs/servers/home-assistant/custom-lovelace-modules/zigbee2mqtt-networkmap/default.nix @@ -0,0 +1,59 @@ +{ lib +, fetchFromGitHub +, fetchYarnDeps +, mkYarnPackage +}: + +mkYarnPackage rec { + pname = "zigbee2mqtt-networkmap"; + version = "unstable-2023-12-06"; + + src = fetchFromGitHub { + owner = "azuwis"; + repo = "zigbee2mqtt-networkmap"; + rev = "d5f1002118ba5881c6bdc27cb0f67642575c414f"; + hash = "sha256-ITqzMjom2XN7+ICDH0Z5YJWY5GNUXzaqSuEzXekhw9I="; + }; + + packageJSON = ./package.json; + + offlineCache = fetchYarnDeps { + yarnLock = "${src}/yarn.lock"; + hash = "sha256-uPhD6UQ1KI7y6bqqQF7InT9eKU9VWGf2D60Lo5Mwcf8="; + }; + + configurePhase = '' + cp -r $node_modules node_modules + chmod +w node_modules + ''; + + buildPhase = '' + runHook preBuild + + yarn --offline build + + runHook postBuild + ''; + + installPhase = '' + runHook preInstall + + mkdir $out + cp -v dist/zigbee2mqtt-networkmap.js $out/ + + runHook postInstall + ''; + + dontFixup = true; + + doDist = false; + + passthru.entrypoint = "zigbee2mqtt-networkmap.js"; + + meta = with lib; { + description = "Home Assistant Custom Card to show Zigbee2mqtt network map"; + homepage = "https://github.com/azuwis/zigbee2mqtt-networkmap"; + maintainers = with maintainers; [ azuwis ]; + license = licenses.mit; + }; +} diff --git a/pkgs/servers/home-assistant/custom-lovelace-modules/zigbee2mqtt-networkmap/package.json b/pkgs/servers/home-assistant/custom-lovelace-modules/zigbee2mqtt-networkmap/package.json new file mode 100644 index 000000000000..b989bfde28e4 --- /dev/null +++ b/pkgs/servers/home-assistant/custom-lovelace-modules/zigbee2mqtt-networkmap/package.json @@ -0,0 +1,25 @@ +{ + "name": "zigbee2mqtt-networkmap", + "version": "0.1.0", + "private": true, + "scripts": { + "serve": "vue-cli-service serve", + "build": "vue-cli-service build", + "lint": "vue-cli-service lint" + }, + "dependencies": { + "vue": "^3.3.4" + }, + "devDependencies": { + "@material/mwc-button": "^0.27.0", + "@vue/cli-plugin-eslint": "^5.0.8", + "@vue/cli-service": "^5.0.8", + "@vue/eslint-config-standard": "^8.0.1", + "@babel/core": "^7.0.0", + "@babel/eslint-parser": "^7.0.0", + "eslint": "^8.42.0", + "eslint-plugin-vue": "^9.14.1", + "lodash.isequal": "^4.5.0", + "vue-d3-network": "^0.1.28" + } +} |