about summary refs log tree commit diff
path: root/pkgs/servers/home-assistant/custom-lovelace-modules/decluttering-card/default.nix
blob: 44a83e71e5505df9371cb5074f07bb1ad6895aec (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
{ lib
, buildNpmPackage
, fetchFromGitHub
}:

buildNpmPackage rec {
  pname = "decluttering-card";
  version = "1.0.0";

  src = fetchFromGitHub {
    owner = "custom-cards";
    repo = "decluttering-card";
    rev = "v${version}";
    hash = "sha256-8pf7G6RbLdpIdXYz801+wwAc3NcNs8l0x4fSGqlAmG0=";
  };

  npmDepsHash = "sha256-9tmEfKo8n2LR+r40hEqOfn7w6/P29XQ+KZSHL97wUuY=";

  installPhase = ''
    runHook preInstall

    mkdir $out
    cp dist/decluttering-card.js $out

    runHook postInstall
  '';

  meta = with lib; {
    description = "Declutter your lovelace configuration with the help of this card";
    homepage = "https://github.com/custom-cards/decluttering-card";
    changelog = "https://github.com/custom-cards/decluttering-card/blob/${src.rev}/CHANGELOG.md";
    license = licenses.mit;
    maintainers = with maintainers; [ k900 ];
    platforms = platforms.all;
  };
}