Commit 573d2d4e authored by Andrew Marshall's avatar Andrew Marshall
Browse files

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.
parent 3636d93f
Loading
Loading
Loading
Loading
+22 −0
Original line number Diff line number Diff line
@@ -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";