Unverified Commit 89eeae10 authored by dotlambda's avatar dotlambda Committed by GitHub
Browse files

home-assistant: support prowl component (#464430)

parents fb82e9a8 ff421774
Loading
Loading
Loading
Loading
+64 −0
Original line number Diff line number Diff line
{
  buildPythonPackage,
  click,
  fetchFromGitHub,
  httpx,
  lib,
  loguru,
  pytest-asyncio,
  pytest-cov-stub,
  pytestCheckHook,
  respx,
  setuptools,
  xmltodict,
}:

buildPythonPackage rec {
  pname = "prowlpy";
  version = "1.1.3";
  pyproject = true;

  src = fetchFromGitHub {
    owner = "OMEGARAZER";
    repo = "prowlpy";
    tag = "v${version}";
    hash = "sha256-AotlO1CTe1jv9nu9drQWXYi445Pl5c+89/ep3i+vWwA=";
  };

  build-system = [ setuptools ];

  dependencies = [
    httpx
    xmltodict
  ]
  ++ httpx.optional-dependencies.http2;

  optional-dependencies = {
    cli = [
      click
      loguru
    ];
  };

  pythonImportsCheck = [ "prowlpy" ];

  nativeCheckInputs = [
    pytest-asyncio
    pytest-cov-stub
    pytestCheckHook
    respx
  ]
  ++ lib.concatLists (lib.attrValues optional-dependencies);

  # tests fail without this
  pytestFlags = [ "-v" ];

  meta = {
    changelog = "https://github.com/OMEGARAZER/prowlpy/blob/${src.tag}/CHANGELOG.md";
    description = "Send push notifications to iPhones using the Prowl API";
    homepage = "https://github.com/OMEGARAZER/prowlpy";
    license = lib.licenses.gpl3Only;
    mainProgram = "prowlpy";
    maintainers = [ lib.maintainers.dotlambda ];
  };
}
+3 −1
Original line number Diff line number Diff line
@@ -4734,7 +4734,8 @@
      ];
    "prowl" =
      ps: with ps; [
      ]; # missing inputs: prowlpy
        prowlpy
      ];
    "proximity" =
      ps: with ps; [
      ];
@@ -7715,6 +7716,7 @@
    "progettihwsw"
    "prometheus"
    "prosegur"
    "prowl"
    "proximity"
    "prusalink"
    "ps4"
+2 −0
Original line number Diff line number Diff line
@@ -12471,6 +12471,8 @@ self: super: with self; {
  prov = callPackage ../development/python-modules/prov { };
  prowlpy = callPackage ../development/python-modules/prowlpy { };
  prox-tv = callPackage ../development/python-modules/prox-tv { };
  proxmoxer = callPackage ../development/python-modules/proxmoxer { };