From 573d2d4e29066cba7fd4c0257020cbf5084ef91e Mon Sep 17 00:00:00 2001 From: Andrew Marshall Date: Sat, 7 Feb 2026 21:39:43 -0500 Subject: [PATCH] home-assistant-custom-components.auth_oidc: build css from source Remove the pre-compiled stylesheet and build from source, this makes it possible to patch it if desired. --- .../custom-components/auth_oidc/package.nix | 22 +++++++++++++++++++ 1 file changed, 22 insertions(+) diff --git a/pkgs/servers/home-assistant/custom-components/auth_oidc/package.nix b/pkgs/servers/home-assistant/custom-components/auth_oidc/package.nix index bfb8233a4892..dbbd4ce371eb 100644 --- a/pkgs/servers/home-assistant/custom-components/auth_oidc/package.nix +++ b/pkgs/servers/home-assistant/custom-components/auth_oidc/package.nix @@ -2,10 +2,13 @@ lib, buildHomeAssistantComponent, fetchFromGitHub, + fetchNpmDeps, aiofiles, bcrypt, jinja2, joserfc, + nodejs, + npmHooks, python-jose, }: @@ -21,6 +24,21 @@ buildHomeAssistantComponent rec { hash = "sha256-nclrSO6KmPnwXRPuuFwR6iYHsyfqcelPRGERWVJpdyk="; }; + postPatch = '' + rm custom_components/auth_oidc/static/style.css + ''; + + env.npmDeps = fetchNpmDeps { + name = "${domain}-npm-deps"; + inherit src; + hash = "sha256-i75YeCZVSMFDWzaiDJRTYqQee5I15n9ll0YYX1PXYbA="; + }; + + nativeBuildInputs = [ + npmHooks.npmConfigHook + nodejs + ]; + dependencies = [ aiofiles bcrypt @@ -29,6 +47,10 @@ buildHomeAssistantComponent rec { python-jose ]; + postBuild = '' + npm run css + ''; + meta = { changelog = "https://github.com/christiaangoossens/hass-oidc-auth/releases/tag/v${version}"; description = "OpenID Connect authentication provider for Home Assistant";