From cba3d0d236d6e121e88fa14056489ac080d9a4fe Mon Sep 17 00:00:00 2001 From: Jon Seager Date: Sun, 3 Mar 2024 18:07:00 +0000 Subject: [PATCH] homepage-dashboard: patch to enable control of log targets This piece of software is generally used (and documented upstream) in containers. It is common practice for such applications to log both to stdout, and to a file which can be volume-mounted in the container. Because the intention here is to start with systemd, it makes less sense to have both, so this added patch stops the application from trying to create a log directory alongside the config directory. --- pkgs/servers/homepage-dashboard/default.nix | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/pkgs/servers/homepage-dashboard/default.nix b/pkgs/servers/homepage-dashboard/default.nix index 7a28803df611..6f0a94500ef0 100644 --- a/pkgs/servers/homepage-dashboard/default.nix +++ b/pkgs/servers/homepage-dashboard/default.nix @@ -39,6 +39,20 @@ buildNpmPackage rec { npmDepsHash = "sha256-u15lDdXnV3xlXAC9WQQKLIeV/AgtRM1sFNsacw3j6kU="; + # This project is primarily designed to be consumed through Docker. + # By default it logs to stdout, and also to a directory. This makes + # little sense here where all the logs will be collated in the + # systemd journal anyway, so the patch removes the file logging. + # This patch has been suggested upstream, but the contribution won't + # be accepted until it gets at least 10 upvotes, per their policy: + # https://github.com/gethomepage/homepage/discussions/3067 + patches = [ + (fetchpatch { + url = "https://github.com/gethomepage/homepage/commit/3be28a2c8b68f2404e4083e7f32eebbccdc4d293.patch"; + hash = "sha256-5fUOXiHBZ4gdPeOHe1NIaBLaHJTDImsRjSwtueQOEXY="; + }) + ]; + preBuild = '' mkdir -p config '';