Files
Dark Steveneq 646b892680
Some checks failed
Periodic Merges (6h) / master → staging-nixos (push) Failing after 12m50s
Periodic Merges (6h) / master → staging-next (push) Failing after 12m54s
Periodic Merges (24h) / merge-base(master,staging) → haskell-updates (push) Failing after 11m54s
Periodic Merges (6h) / staging-next → staging (push) Failing after 12m13s
Periodic Merges (24h) / staging-next-25.05 → staging-25.05 (push) Failing after 13m24s
Periodic Merges (24h) / release-25.05 → staging-next-25.05 (push) Failing after 14m28s
push sheeet
2025-10-09 14:15:47 +02:00

54 lines
1.1 KiB
Nix

{
lib,
mkYarnPackage,
fetchYarnDeps,
fetchFromGitHub,
}:
mkYarnPackage rec {
pname = "button-card";
version = "4.1.2";
src = fetchFromGitHub {
owner = "custom-cards";
repo = "button-card";
rev = "v${version}";
hash = "sha256-Ntg1sNgAehcL2fT0rP0YHzV5q6rB5p1TyFXtbZyB3Vo=";
};
packageJSON = ./package.json;
offlineCache = fetchYarnDeps {
yarnLock = src + "/yarn.lock";
hash = "sha256-OFnsRR9zA9D22xBdh4XfLueGVA2ERXmGEp54x0OFDFY=";
};
buildPhase = ''
runHook preBuild
yarn build
runHook postBuild
'';
installPhase = ''
runHook preInstall
mkdir $out
cp ./deps/button-card/dist/button-card.js $out
runHook postInstall
'';
doDist = false;
meta = with lib; {
description = "Lovelace button-card for home assistant";
homepage = "https://github.com/custom-cards/button-card";
changelog = "https://github.com/custom-cards/button-card/blob/${src.rev}/CHANGELOG.md";
license = licenses.mit;
maintainers = with maintainers; [ k900 ];
platforms = platforms.all;
};
}