1
1
Fork 1
mirror of https://github.com/oddlama/nix-config.git synced 2025-10-10 14:50:40 +02:00

feat: add lg-webos-remote-control and clock-weather-card

This commit is contained in:
oddlama 2025-01-27 03:48:33 +01:00
parent 4c10c73df0
commit e3cfd89178
No known key found for this signature in database
GPG key ID: 14EFE510775FE39A
3 changed files with 119 additions and 15 deletions

View file

@ -0,0 +1,54 @@
{
"name": "clock-weather-card",
"version": "2.8.7",
"description": "Lovelace clock-weather-card",
"keywords": [
"home-assistant",
"homeassistant",
"hass",
"automation",
"lovelace",
"custom-cards"
],
"module": "clock-weather-card.js",
"repository": "git@github.com:pkissling/clock-weather-card.git",
"author": "Patrick Kissling <patrick.kissling@gmx.de>",
"license": "MIT",
"type": "module",
"dependencies": {
"custom-card-helpers": "^1.8.0",
"home-assistant-js-websocket": "^9.0.0",
"lit": "^2.8.0",
"luxon": "^3.4.3"
},
"devDependencies": {
"@babel/core": "^7.15.0",
"@babel/plugin-proposal-class-properties": "^7.14.5",
"@babel/plugin-proposal-decorators": "^7.14.5",
"@rollup/plugin-babel": "^6.0.0",
"@rollup/plugin-image": "^3.0.0",
"@rollup/plugin-json": "^6.0.0",
"@rollup/plugin-node-resolve": "^16.0.0",
"@types/luxon": "^3.3.2",
"@typescript-eslint/eslint-plugin": "^7.0.0",
"@typescript-eslint/parser": "^7.0.0",
"eslint": "^8.0.1",
"eslint-config-standard-with-typescript": "^43.0.0",
"eslint-plugin-import": "^2.25.2",
"eslint-plugin-n": "^15.0.0 || ^16.0.0 || ^17.0.0",
"eslint-plugin-promise": "^7.0.0",
"rollup": "^4.0.0",
"rollup-plugin-commonjs": "^10.1.0",
"rollup-plugin-gzip": "^4.0.0",
"rollup-plugin-serve": "^3.0.0",
"@rollup/plugin-terser": "^0.4.0",
"rollup-plugin-typescript2": "^0.36.0",
"typescript": "*"
},
"scripts": {
"start": "rollup -c rollup.config.dev.js --watch",
"build": "yarn rollup",
"lint": "eslint **/*.ts --max-warnings 0",
"rollup": "rollup -c"
}
}

View file

@ -0,0 +1,52 @@
{
lib,
fetchFromGitHub,
mkYarnPackage,
fetchYarnDeps,
}:
mkYarnPackage rec {
pname = "clock-weather-card";
version = "2.8.7";
src = fetchFromGitHub {
owner = "pkissling";
repo = "clock-weather-card";
rev = "v${version}";
hash = "sha256-ylJNI0DE+3j8EZFpUmuuBnII8nBMrJ5bhlGVh3M25eo=";
};
packageJSON = ./package.json;
offlineCache = fetchYarnDeps {
yarnLock = src + "/yarn.lock";
hash = "sha256-EUuPF2kS6CaJ2MUYoBocLOQyOgkhRHd34ul+efJua7Q=";
};
buildPhase = ''
runHook preBuild
yarn build
runHook postBuild
'';
installPhase = ''
runHook preInstall
mkdir $out
cp ./deps/clock-weather-card/dist/clock-weather-card.js $out/
runHook postInstall
'';
doDist = false;
meta = with lib; {
description = "A Home Assistant Card indicating today's date/time, along with an iOS inspired weather forecast for the next days with animated icons";
homepage = "https://github.com/pkissling/clock-weather-card";
changelog = "https://github.com/pkissling/clock-weather-card/blob/${src.rev}/CHANGELOG.md";
license = licenses.mit;
maintainers = with maintainers; [ oddlama ];
mainProgram = "clock-weather-card";
platforms = platforms.linux;
};
}

View file

@ -63,21 +63,19 @@ in
}))
];
customLovelaceModules =
let
mods = pkgs.home-assistant-custom-lovelace-modules;
in
[
mods.bubble-card
mods.weather-card
mods.mini-graph-card
mods.card-mod
mods.mushroom
mods.multiple-entity-row
mods.button-card
mods.weather-chart-card
mods.hourly-weather
];
customLovelaceModules = with pkgs.home-assistant-custom-lovelace-modules; [
(pkgs.callPackage ./hass-lovelace/clock-weather-card/package.nix { })
bubble-card
button-card
card-mod
hourly-weather
lg-webos-remote-control
mini-graph-card
multiple-entity-row
mushroom
weather-card
weather-chart-card
];
config = {
default_config = { };