diff --git a/pkgs/development/python-modules/py-dormakaba-dkey/default.nix b/pkgs/development/python-modules/py-dormakaba-dkey/default.nix new file mode 100644 index 000000000000..6c70ad8861c7 --- /dev/null +++ b/pkgs/development/python-modules/py-dormakaba-dkey/default.nix @@ -0,0 +1,49 @@ +{ lib +, bleak +, bleak-retry-connector +, buildPythonPackage +, cryptography +, fetchFromGitHub +, pythonOlder +, setuptools +}: + +buildPythonPackage rec { + pname = "py-dormakaba-dkey"; + version = "1.0.4"; + format = "pyproject"; + + disabled = pythonOlder "3.10"; + + src = fetchFromGitHub { + owner = "emontnemery"; + repo = pname; + rev = "refs/tags/${version}"; + hash = "sha256-1jIsKQa27XNVievU02jjanRWFtJDYsHolgPBab6qpM0="; + }; + + nativeBuildInputs = [ + setuptools + ]; + + propagatedBuildInputs = [ + bleak + bleak-retry-connector + cryptography + ]; + + # Module has no tests + doCheck = false; + + pythonImportsCheck = [ + "py_dormakaba_dkey" + ]; + + meta = with lib; { + description = "Library to interact with a Dormakaba dkey lock"; + homepage = "https://github.com/emontnemery/py-dormakaba-dkey"; + changelog = "https://github.com/emontnemery/py-dormakaba-dkey/releases/tag/${version}"; + license = licenses.mit; + maintainers = with maintainers; [ fab ]; + }; +} diff --git a/pkgs/servers/home-assistant/component-packages.nix b/pkgs/servers/home-assistant/component-packages.nix index 6111c357490e..96f3cf7d8c5d 100644 --- a/pkgs/servers/home-assistant/component-packages.nix +++ b/pkgs/servers/home-assistant/component-packages.nix @@ -804,11 +804,12 @@ esphome-dashboard-api fnvhash ifaddr + py-dormakaba-dkey pyserial pyudev sqlalchemy zeroconf - ]; # missing inputs: py-dormakaba-dkey + ]; "dovado" = ps: with ps; [ ]; # missing inputs: dovado "downloader" = ps: with ps; [ @@ -4453,6 +4454,7 @@ "dlna_dms" "dnsip" "doorbird" + "dormakaba_dkey" "dsmr" "dsmr_reader" "dte_energy_bridge" diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index e63ad2a6fe9e..bfc540b317fb 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -7743,6 +7743,8 @@ self: super: with self; { py-dmidecode = callPackage ../development/python-modules/py-dmidecode { }; + py-dormakaba-dkey = callPackage ../development/python-modules/py-dormakaba-dkey { }; + py-nightscout = callPackage ../development/python-modules/py-nightscout { }; py-synologydsm-api = callPackage ../development/python-modules/py-synologydsm-api { };