Unverified Commit 87813440 authored by Martin Weinelt's avatar Martin Weinelt Committed by GitHub
Browse files

home-assistant: support eddystone_temperature component (#370679)

parents 4246e8e0 2c596c1c
Loading
Loading
Loading
Loading
+45 −0
Original line number Diff line number Diff line
{
  buildPythonPackage,
  fetchFromGitHub,
  future,
  lib,
  pytestCheckHook,
  setuptools,
}:

buildPythonPackage rec {
  pname = "ahocorapy";
  version = "1.6.2";
  pyproject = true;

  src = fetchFromGitHub {
    owner = "abusix";
    repo = "ahocorapy";
    tag = version;
    hash = "sha256-ynVkDnrZ12dpNPoKfUdw0/X06aORFkmXFMVH9u0Payo=";
  };

  build-system = [ setuptools ];

  dependencies = [
    future
  ];

  pythonImportsCheck = [ "ahocorapy" ];

  nativeCheckInputs = [
    pytestCheckHook
  ];

  pytestFlagsArray = [
    "tests/ahocorapy_test.py"
  ];

  meta = {
    changelog = "https://github.com/abusix/ahocorapy/blob/${src.tag}/CHANGELOG";
    description = "Pure python Aho-Corasick library";
    homepage = "https://github.com/abusix/ahocorapy";
    license = lib.licenses.mit;
    maintainers = with lib.maintainers; [ dotlambda ];
  };
}
+53 −0
Original line number Diff line number Diff line
{
  ahocorapy,
  buildPythonPackage,
  construct,
  fetchFromGitHub,
  lib,
  pybluez,
  pytestCheckHook,
  setuptools,
  stdenv,
}:

buildPythonPackage rec {
  pname = "beacontools";
  version = "2.1.0";
  pyproject = true;

  src = fetchFromGitHub {
    owner = "citruz";
    repo = "beacontools";
    tag = "v${version}";
    hash = "sha256-3a/HDssOqIfReSijRvmiXwuZjvWLJfDaDyUdA2vv/jA=";
  };

  build-system = [ setuptools ];

  pythonRelaxDeps = [
    "ahocorapy"
  ];

  dependencies = [
    ahocorapy
    construct
  ];

  optional-dependencies = {
    scan = lib.optionals stdenv.hostPlatform.isLinux [ pybluez ];
  };

  pythonImportsCheck = [ "beacontools" ];

  nativeCheckInputs = [
    pytestCheckHook
  ];

  meta = {
    changelog = "https://github.com/citruz/beacontools/releases/tag/${src.tag}";
    description = "Python library for working with various types of Bluetooth LE Beacons";
    homepage = "https://github.com/citruz/beacontools";
    license = lib.licenses.mit;
    maintainers = with lib.maintainers; [ dotlambda ];
  };
}
+6 −2
Original line number Diff line number Diff line
@@ -1323,8 +1323,12 @@
        aioecowitt
      ];
    "eddystone_temperature" =
      ps: with ps; [
      ]; # missing inputs: beacontools
      ps:
      with ps;
      [
        beacontools
      ]
      ++ beacontools.optional-dependencies.scan;
    "edimax" =
      ps: with ps; [
        pyedimax
+4 −0
Original line number Diff line number Diff line
@@ -131,6 +131,8 @@ self: super: with self; {
  aggdraw = callPackage ../development/python-modules/aggdraw { };
  ahocorapy = callPackage ../development/python-modules/ahocorapy { };
  ahocorasick-rs = callPackage ../development/python-modules/ahocorasick-rs { };
  aigpy = callPackage ../development/python-modules/aigpy { };
@@ -1565,6 +1567,8 @@ self: super: with self; {
  bdffont = callPackage ../development/python-modules/bdffont { };
  beacontools = callPackage ../development/python-modules/beacontools { };
  beaker = callPackage ../development/python-modules/beaker { };
  before-after = callPackage ../development/python-modules/before-after { };