diff options
Diffstat (limited to 'nixpkgs/pkgs/servers/home-assistant/custom-lovelace-modules')
5 files changed, 130 insertions, 3 deletions
diff --git a/nixpkgs/pkgs/servers/home-assistant/custom-lovelace-modules/default.nix b/nixpkgs/pkgs/servers/home-assistant/custom-lovelace-modules/default.nix index 4bb1e63b5f7f..38bfeed576d4 100644 --- a/nixpkgs/pkgs/servers/home-assistant/custom-lovelace-modules/default.nix +++ b/nixpkgs/pkgs/servers/home-assistant/custom-lovelace-modules/default.nix @@ -2,7 +2,11 @@ }: { + light-entity-card = callPackage ./light-entity-card { }; + mini-graph-card = callPackage ./mini-graph-card {}; mini-media-player = callPackage ./mini-media-player {}; + + zigbee2mqtt-networkmap = callPackage ./zigbee2mqtt-networkmap { }; } diff --git a/nixpkgs/pkgs/servers/home-assistant/custom-lovelace-modules/light-entity-card/default.nix b/nixpkgs/pkgs/servers/home-assistant/custom-lovelace-modules/light-entity-card/default.nix new file mode 100644 index 000000000000..9c1e97b0f8ed --- /dev/null +++ b/nixpkgs/pkgs/servers/home-assistant/custom-lovelace-modules/light-entity-card/default.nix @@ -0,0 +1,39 @@ +{ lib +, buildNpmPackage +, fetchFromGitHub +}: + +buildNpmPackage rec { + pname = "light-entity-card"; + version = "6.1.0"; + + src = fetchFromGitHub { + owner = "ljmerza"; + repo = "light-entity-card"; + rev = "refs/tags/${version}"; + hash = "sha256-CJpRvgPf7+v9m/8/O2R+nut3PnyDPC8OTipyE+Brp9U="; + }; + + npmDepsHash = "sha256-EZDTWtn3joikwiC5Kfn94+tXRDpBhMDHqHozfIkfbJ0="; + + env.NODE_OPTIONS = "--openssl-legacy-provider"; + + installPhase = '' + runHook preInstall + + mkdir $out + cp -v dist/light-entity-card.js* $out/ + + runHook postInstall + ''; + + passthru.entrypoint = "light-entity-card.js"; + + meta = with lib; { + description = "Control any light or switch entity"; + homepage = "https://github.com/ljmerza/light-entity-card"; + changelog = "https://github.com/ljmerza/light-entity-card/releases/tag/${version}"; + maintainers = with maintainers; [ SuperSandro2000 ]; + license = licenses.mit; + }; +} diff --git a/nixpkgs/pkgs/servers/home-assistant/custom-lovelace-modules/mini-media-player/default.nix b/nixpkgs/pkgs/servers/home-assistant/custom-lovelace-modules/mini-media-player/default.nix index 6945b18bde20..749b15398f4b 100644 --- a/nixpkgs/pkgs/servers/home-assistant/custom-lovelace-modules/mini-media-player/default.nix +++ b/nixpkgs/pkgs/servers/home-assistant/custom-lovelace-modules/mini-media-player/default.nix @@ -5,16 +5,16 @@ buildNpmPackage rec { pname = "mini-media-player"; - version = "1.16.5"; + version = "1.16.6"; src = fetchFromGitHub { owner = "kalkih"; repo = "mini-media-player"; rev = "v${version}"; - hash = "sha256-ydkY7Qx2GMh4CpvvBAQubJ7PlxSscDZRJayn82bOczM="; + hash = "sha256-1cC9dyZ9+7dXSL/dmFD0HV7SgsBW2zA7a+eOKVwbzg8="; }; - npmDepsHash = "sha256-v9NvZOrQPMOoG3LKACnu79jKgZtcnGiopWad+dFbplw="; + npmDepsHash = "sha256-/7roW1xkZmGuB/8nFaQz0Yeuai6yJ+cH7Uqa/zxfa5w="; installPhase = '' runHook preInstall diff --git a/nixpkgs/pkgs/servers/home-assistant/custom-lovelace-modules/zigbee2mqtt-networkmap/default.nix b/nixpkgs/pkgs/servers/home-assistant/custom-lovelace-modules/zigbee2mqtt-networkmap/default.nix new file mode 100644 index 000000000000..ef412801bfe9 --- /dev/null +++ b/nixpkgs/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/nixpkgs/pkgs/servers/home-assistant/custom-lovelace-modules/zigbee2mqtt-networkmap/package.json b/nixpkgs/pkgs/servers/home-assistant/custom-lovelace-modules/zigbee2mqtt-networkmap/package.json new file mode 100644 index 000000000000..b989bfde28e4 --- /dev/null +++ b/nixpkgs/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" + } +} |