From 089a8d87cb089fc91f10adf9d559959886893506 Mon Sep 17 00:00:00 2001 From: Jeremy Fleischman Date: Fri, 11 Jul 2025 11:49:31 -0700 Subject: [PATCH] home-assistant-custom-lovelace-modules.restriction-card: init at 1.2.19 --- .../restriction-card/package.nix | 36 +++++++++++++++++++ 1 file changed, 36 insertions(+) create mode 100644 pkgs/servers/home-assistant/custom-lovelace-modules/restriction-card/package.nix diff --git a/pkgs/servers/home-assistant/custom-lovelace-modules/restriction-card/package.nix b/pkgs/servers/home-assistant/custom-lovelace-modules/restriction-card/package.nix new file mode 100644 index 000000000000..3c14c273d465 --- /dev/null +++ b/pkgs/servers/home-assistant/custom-lovelace-modules/restriction-card/package.nix @@ -0,0 +1,36 @@ +{ + lib, + buildNpmPackage, + fetchFromGitHub, +}: + +buildNpmPackage (finalAttrs: { + pname = "restriction-card"; + version = "1.2.19"; + + src = fetchFromGitHub { + owner = "iantrich"; + repo = "restriction-card"; + tag = finalAttrs.version; + hash = "sha256-2scUSEpDPrMoos/QuOqXARAf1IL8P4gJaga7LRQ/67U="; + }; + + npmDepsHash = "sha256-9Hz+7Q4i5baIWxVIo6e8d5isvZWnJW2947q5Uk0Gm9w="; + + installPhase = '' + runHook preInstall + + mkdir $out + install -m0644 dist/restriction-card.js $out + + runHook postInstall + ''; + + meta = { + changelog = "https://github.com/iantrich/restriction-card/releases/tag/${finalAttrs.src.tag}"; + description = "Apply restrictions to Lovelace cards"; + homepage = "https://github.com/iantrich/restriction-card"; + license = lib.licenses.mit; + maintainers = with lib.maintainers; [ jfly ]; + }; +})