temp commit
This commit is contained in:
39
modules/nixos/homeassistant/hacs/mail-and-packages.nix
Normal file
39
modules/nixos/homeassistant/hacs/mail-and-packages.nix
Normal file
@@ -0,0 +1,39 @@
|
||||
{ pkgs, ... }:
|
||||
let
|
||||
ha-mail-and-packages = pkgs.buildHomeAssistantComponent rec {
|
||||
owner = "moralmunky";
|
||||
domain = "mail_and_packages";
|
||||
version = "0.4.2";
|
||||
|
||||
src = pkgs.fetchFromGitHub {
|
||||
owner = owner;
|
||||
repo = "Home-Assistant-Mail-And-Packages";
|
||||
rev = version;
|
||||
hash = "sha256-5LBTlRlkSUx8DOY+F7UvUs4dzjZKdBdgnDUdK6DBdew=";
|
||||
};
|
||||
|
||||
propagatedBuildInputs = with pkgs.python3Packages; [
|
||||
beautifulsoup4
|
||||
dateparser
|
||||
pillow
|
||||
];
|
||||
|
||||
postPatch = ''
|
||||
substituteInPlace custom_components/mail_and_packages/const.py \
|
||||
--replace 'DEFAULT_PATH = "/var/lib/homeassistant/images/"' 'DEFAULT_PATH = "/var/lib/homeassistant/images/"'
|
||||
--replace 'DEFAULT_CUSTOM_IMG_FILE = "/var/lib/homeassistant/mail_none.gif"' 'DEFAULT_CUSTOM_IMG_FILE = "/var/lib/homeassistant/mail_none.gif"'
|
||||
'';
|
||||
|
||||
meta = {
|
||||
changelog = "https://github.com/moralmunky/Home-Assistant-Mail-And-Packages/releases/tag/${version}";
|
||||
description = "The Mail and Packages integration creates sensors for supported shippers to show a snapshot of mail and packages that are scheduled to be delivered the current day.";
|
||||
homepage = "https://github.com/moralmunky/Home-Assistant-Mail-And-Packages";
|
||||
maintainers = [ ];
|
||||
};
|
||||
};
|
||||
in
|
||||
{
|
||||
services.home-assistant.customComponents = [
|
||||
ha-mail-and-packages
|
||||
];
|
||||
}
|
||||
Reference in New Issue
Block a user