depot/third_party/nixpkgs/pkgs/servers/home-assistant/custom-lovelace-modules/light-entity-card/default.nix
Default email 504525a148 Project import generated by Copybara.
GitOrigin-RevId: bd645e8668ec6612439a9ee7e71f7eac4099d4f6
2024-01-02 12:29:13 +01:00

39 lines
934 B
Nix

{ lib
, buildNpmPackage
, fetchFromGitHub
}:
buildNpmPackage rec {
pname = "light-entity-card";
version = "6.1.1";
src = fetchFromGitHub {
owner = "ljmerza";
repo = "light-entity-card";
rev = "refs/tags/${version}";
hash = "sha256-LoZt65oAw52NxVFgV9kVDr65CX5G6Xek2zDafDIxXmw=";
};
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;
};
}