feat: add home-assistant-custom-lovelace-modules/bar-card

This commit is contained in:
Patrick 2025-01-28 21:01:26 +01:00
parent 0660c722cf
commit 86bb6fb118
No known key found for this signature in database
GPG key ID: 451F95EFB8BECD0F
6 changed files with 76 additions and 65 deletions

7
pkgs/default.nix Normal file
View file

@ -0,0 +1,7 @@
_final: prev: {
home-assistant-custom-lovelace-modules =
prev.home-assistant-custom-lovelace-modules
// {
bar-card = prev.callPackage ./home-assistant/bar-card.nix {};
};
}

View file

@ -0,0 +1,36 @@
{
stdenvNoCC,
fetchFromGitHub,
fetchYarnDeps,
yarnConfigHook,
yarnBuildHook,
nodejs,
}:
stdenvNoCC.mkDerivation rec {
pname = "bar-card";
version = "3.2.0";
src = fetchFromGitHub {
owner = "patrickdag";
repo = "bar-card";
rev = "ad9b1e83f6cf75b699911ebc34a4782c707f254f";
hash = "sha256-1dX6HErKfhMgu9YQATsUk9jPFbCRRoQLhYISM+evVQM=";
};
offlineCache = fetchYarnDeps {
inherit src;
hash = "sha256-f/kFCxIinW/9Po0pZM9V8i0ySqiGqz1rmEEFSvw1Gk4=";
};
nativeBuildInputs = [
yarnConfigHook
yarnBuildHook
nodejs
];
installPhase = ''
runHook preInstall
mkdir -p $out
cp dist/* $out
runHook postInstall
'';
}