Commit ea900368 authored by Alex Martens's avatar Alex Martens
Browse files

home-assistant-custom-components.auth_oidc: 0.6.5-alpha -> 1.0.2

parent 3b3ce72d
Loading
Loading
Loading
Loading
+18 −8
Original line number Diff line number Diff line
@@ -4,34 +4,40 @@
  fetchFromGitHub,
  fetchNpmDeps,
  aiofiles,
  bcrypt,
  jinja2,
  joserfc,
  nodejs,
  npmHooks,
  python-jose,
  pytestCheckHook,
  pytest-homeassistant-custom-component,
  pytest-cov-stub,
}:

buildHomeAssistantComponent rec {
  owner = "christaangoossens";
  domain = "auth_oidc";
  version = "0.6.5-alpha";
  version = "1.0.2";

  src = fetchFromGitHub {
    owner = "christiaangoossens";
    repo = "hass-oidc-auth";
    tag = "v${version}";
    hash = "sha256-nclrSO6KmPnwXRPuuFwR6iYHsyfqcelPRGERWVJpdyk=";
    hash = "sha256-ZYJD0PVh2E07cdY1a7uxSxdooAMz78HwJpwr4uWofZM=";
  };

  postPatch = ''
    rm custom_components/auth_oidc/static/style.css
    # Tests import directly from auth_oidc, but the component is installed
    # under custom_components.auth_oidc
    for f in tests/test_hass_webserver.py tests/test_state_store.py; do
      substituteInPlace "$f" \
        --replace-fail "from auth_oidc" "from custom_components.auth_oidc"
    done
  '';

  env.npmDeps = fetchNpmDeps {
    name = "${domain}-npm-deps";
    inherit src;
    hash = "sha256-i75YeCZVSMFDWzaiDJRTYqQee5I15n9ll0YYX1PXYbA=";
    hash = "sha256-R5i4o2VnaXwgX72r6cBJULxSKadkU22vriMMWoMc5As=";
  };

  nativeBuildInputs = [
@@ -41,16 +47,20 @@ buildHomeAssistantComponent rec {

  dependencies = [
    aiofiles
    bcrypt
    jinja2
    joserfc
    python-jose
  ];

  postBuild = ''
    npm run css
  '';

  nativeCheckInputs = [
    pytestCheckHook
    pytest-homeassistant-custom-component
    pytest-cov-stub
  ];

  meta = {
    changelog = "https://github.com/christiaangoossens/hass-oidc-auth/releases/tag/v${version}";
    description = "OpenID Connect authentication provider for Home Assistant";