40 lines
810 B
Nix
40 lines
810 B
Nix
{
|
|
lib,
|
|
buildNpmPackage,
|
|
fetchFromGitHub,
|
|
}:
|
|
|
|
buildNpmPackage rec {
|
|
pname = "my-cards";
|
|
version = "v1.0.6";
|
|
|
|
src = fetchFromGitHub {
|
|
owner = "AnthonMS";
|
|
repo = "my-cards";
|
|
rev = version;
|
|
hash = "sha256-x0vOq87P1uOq5ILB4CSAowaAtUo4Nu9m6DFRiqa/Sw4=";
|
|
};
|
|
|
|
npmDepsHash = "sha256-QohapCm6ABarHYwLlAhubvlrU5Z626vNAX1OB8b9A6g=";
|
|
|
|
installPhase = ''
|
|
runHook preInstall
|
|
|
|
mkdir $out
|
|
install -m0644 dist/my-cards.js $out
|
|
|
|
runHook postInstall
|
|
'';
|
|
|
|
passthru.entrypoint = "my-cards.js";
|
|
|
|
makeCacheWritable = true;
|
|
|
|
meta = with lib; {
|
|
description = "Bundle of my custom Lovelace cards for Home Assistant. Includes: my-slider, my-slider-v2, my-button";
|
|
homepage = "https://github.com/AnthonMS/my-cards";
|
|
license = licenses.mit;
|
|
maintainers = [ ];
|
|
};
|
|
}
|