From 734caabaf0cdc9a63af7b03f0af5270f55e1fa39 Mon Sep 17 00:00:00 2001 From: Fabian Affolter Date: Tue, 13 Feb 2024 16:02:55 +0100 Subject: [PATCH 1/2] python311Packages.linear-garage-door: init at 0.2.9 Control Linear Garage Doors with Python https://github.com/IceBotYT/linear-garage-door --- .../linear-garage-door/default.nix | 55 +++++++++++++++++++ pkgs/top-level/python-packages.nix | 2 + 2 files changed, 57 insertions(+) create mode 100644 pkgs/development/python-modules/linear-garage-door/default.nix diff --git a/pkgs/development/python-modules/linear-garage-door/default.nix b/pkgs/development/python-modules/linear-garage-door/default.nix new file mode 100644 index 000000000000..b57f8b0e47af --- /dev/null +++ b/pkgs/development/python-modules/linear-garage-door/default.nix @@ -0,0 +1,55 @@ +{ lib +, aiohttp +, buildPythonPackage +, dnspython +, fetchFromGitHub +, poetry-core +, pythonOlder +, tenacity +}: + +buildPythonPackage rec { + pname = "linear-garage-door"; + version = "0.2.9"; + pyproject = true; + + disabled = pythonOlder "3.8"; + + src = fetchFromGitHub { + owner = "IceBotYT"; + repo = "linear-garage-door"; + rev = "refs/tags/${version}"; + hash = "sha256-hWWJgZnEItYaSxka7zBHPeVlTEiOqRnA2vg6/MvpJGE="; + }; + + postPatch = '' + sed -i pyproject.toml \ + -e "/--cov/d" \ + -e "/--no-cov/d" + ''; + + nativeBuildInputs = [ + poetry-core + ]; + + propagatedBuildInputs = [ + aiohttp + dnspython + tenacity + ]; + + # Module doesn't have tests + doCheck = false; + + pythonImportsCheck = [ + "linear_garage_door" + ]; + + meta = with lib; { + description = "Control Linear Garage Doors with Python"; + homepage = "https://github.com/IceBotYT/linear-garage-door"; + changelog = "https://github.com/IceBotYT/linear-garage-door/blob/${version}/CHANGELOG.md"; + license = licenses.mit; + maintainers = with maintainers; [ fab ]; + }; +} diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index 71d7fc931e7b..089ad4aacf9e 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -6568,6 +6568,8 @@ self: super: with self; { limnoria = callPackage ../development/python-modules/limnoria { }; + linear-garage-door = callPackage ../development/python-modules/linear-garage-door { }; + linear-operator = callPackage ../development/python-modules/linear-operator { }; linecache2 = callPackage ../development/python-modules/linecache2 { }; From ca317d9ddd0a9285e16dd55c99d37c9d074c376a Mon Sep 17 00:00:00 2001 From: Fabian Affolter Date: Tue, 13 Feb 2024 16:12:28 +0100 Subject: [PATCH 2/2] home-assistant: update component-packages --- pkgs/servers/home-assistant/component-packages.nix | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/pkgs/servers/home-assistant/component-packages.nix b/pkgs/servers/home-assistant/component-packages.nix index 5ea284f19a23..2cc45749aed1 100644 --- a/pkgs/servers/home-assistant/component-packages.nix +++ b/pkgs/servers/home-assistant/component-packages.nix @@ -2731,7 +2731,8 @@ limitlessled ]; "linear_garage_door" = ps: with ps; [ - ]; # missing inputs: linear-garage-door + linear-garage-door + ]; "linksys_smart" = ps: with ps; [ ]; "linode" = ps: with ps; [ @@ -6180,6 +6181,7 @@ "life360" "lifx" "light" + "linear_garage_door" "litterrobot" "livisi" "local_calendar"