From 24cfd348b1b2cadc81080f72ed7aad55730c2a82 Mon Sep 17 00:00:00 2001 From: Fabian Affolter Date: Sat, 20 Nov 2021 21:36:52 +0100 Subject: [PATCH 1/3] python3Packages.aiovlc: init at 0.1.0 --- .../python-modules/aiovlc/default.nix | 45 +++++++++++++++++++ pkgs/top-level/python-packages.nix | 2 + 2 files changed, 47 insertions(+) create mode 100644 pkgs/development/python-modules/aiovlc/default.nix diff --git a/pkgs/development/python-modules/aiovlc/default.nix b/pkgs/development/python-modules/aiovlc/default.nix new file mode 100644 index 000000000000..c41a39023706 --- /dev/null +++ b/pkgs/development/python-modules/aiovlc/default.nix @@ -0,0 +1,45 @@ +{ lib +, buildPythonPackage +, click +, fetchFromGitHub +, pytest-asyncio +, pytest-timeout +, pytestCheckHook +, pythonOlder +}: + +buildPythonPackage rec { + pname = "aiovlc"; + version = "0.1.0"; + format = "setuptools"; + + disabled = pythonOlder "3.8"; + + src = fetchFromGitHub { + owner = "MartinHjelmare"; + repo = pname; + rev = "v${version}"; + sha256 = "jB2V/Wpxmp92wba41mWZAeO63wy3NrkupllGxJMNkFM="; + }; + + propagatedBuildInputs = [ + click + ]; + + checkInputs = [ + pytest-asyncio + pytest-timeout + pytestCheckHook + ]; + + pythonImportsCheck = [ + "aiovlc" + ]; + + meta = with lib; { + description = "Python module to control VLC"; + homepage = "https://github.com/MartinHjelmare/aiovlc"; + license = licenses.asl20; + maintainers = with maintainers; [ fab ]; + }; +} diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index 87b06b9eb148..9d6cecf85cb4 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -399,6 +399,8 @@ in { aiounittest = callPackage ../development/python-modules/aiounittest { }; + aiovlc = callPackage ../development/python-modules/aiovlc { }; + aiowatttime = callPackage ../development/python-modules/aiowatttime { }; aiowinreg = callPackage ../development/python-modules/aiowinreg { }; From 2bfbd302b229dacbb16e868a1f77623b53beb4c3 Mon Sep 17 00:00:00 2001 From: Fabian Affolter Date: Sat, 20 Nov 2021 21:38:46 +0100 Subject: [PATCH 2/3] home-assistant: update component-packages --- pkgs/servers/home-assistant/component-packages.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkgs/servers/home-assistant/component-packages.nix b/pkgs/servers/home-assistant/component-packages.nix index a84ad21775fc..f96dd6cb6fb6 100644 --- a/pkgs/servers/home-assistant/component-packages.nix +++ b/pkgs/servers/home-assistant/component-packages.nix @@ -945,7 +945,7 @@ "vivotek" = ps: with ps; [ ]; # missing inputs: libpyvivotek "vizio" = ps: with ps; [ pyvizio ]; "vlc" = ps: with ps; [ python-vlc ]; - "vlc_telnet" = ps: with ps; [ ]; # missing inputs: aiovlc + "vlc_telnet" = ps: with ps; [ aiovlc ]; "voicerss" = ps: with ps; [ ]; "volkszaehler" = ps: with ps; [ volkszaehler ]; "volumio" = ps: with ps; [ pyvolumio ]; From 96d27b27c5d50e08b44adf5a2bd81f8dcf5200c6 Mon Sep 17 00:00:00 2001 From: Fabian Affolter Date: Sat, 20 Nov 2021 21:40:53 +0100 Subject: [PATCH 3/3] home-assistant: enable vlc_telnet tests --- pkgs/servers/home-assistant/default.nix | 1 + 1 file changed, 1 insertion(+) diff --git a/pkgs/servers/home-assistant/default.nix b/pkgs/servers/home-assistant/default.nix index 688afc5baa0a..8612415dd073 100644 --- a/pkgs/servers/home-assistant/default.nix +++ b/pkgs/servers/home-assistant/default.nix @@ -723,6 +723,7 @@ in with py.pkgs; buildPythonApplication rec { "vesync" "vilfo" "vizio" + "vlc_telnet" "voicerss" "volumio" # disabled, becaused AttributeError: does not have the attribute 'server_list'