From 847937c11d48215c6e2b9a2f87925ad43ee0151f Mon Sep 17 00:00:00 2001 From: Fabian Affolter Date: Wed, 5 May 2021 23:10:44 +0200 Subject: [PATCH 1/3] python3Packages.mutesync: init at 0.0.1 --- .../python-modules/mutesync/default.nix | 42 +++++++++++++++++++ pkgs/top-level/python-packages.nix | 2 + 2 files changed, 44 insertions(+) create mode 100644 pkgs/development/python-modules/mutesync/default.nix diff --git a/pkgs/development/python-modules/mutesync/default.nix b/pkgs/development/python-modules/mutesync/default.nix new file mode 100644 index 000000000000..98bf6ce07458 --- /dev/null +++ b/pkgs/development/python-modules/mutesync/default.nix @@ -0,0 +1,42 @@ +{ lib +, aiohttp +, async-timeout +, buildPythonPackage +, fetchpatch +, fetchPypi +}: + +buildPythonPackage rec { + pname = "mutesync"; + version = "0.0.1"; + + src = fetchPypi { + inherit pname version; + sha256 = "05r8maq59glwgysg98y1vrysfb1mkh9jpbag3ixl13n8jw8clp85"; + }; + + propagatedBuildInputs = [ + aiohttp + async-timeout + ]; + + patches = [ + # Don't parse requirements.txt, https://github.com/currentoor/pymutesync/pull/1 + (fetchpatch { + name = "add-requirements.patch"; + url = "https://github.com/currentoor/pymutesync/commit/d66910fc83b1ae3060cdb3fe22a6f91fb70a67f0.patch"; + sha256 = "0axhgriyyv31b1r1yidxcrv0nyrqbb63xw5qrmv2iy2h0v96ijsk"; + }) + ]; + + # Project has not published tests yet + doCheck = false; + pythonImportsCheck = [ "mutesync" ]; + + meta = with lib; { + description = "Python module for interacting with mutesync buttons"; + homepage = "https://github.com/currentoor/pymutesync"; + license = with licenses; [ asl20 ]; + maintainers = with maintainers; [ fab ]; + }; +} diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index 37ae756d9da7..8111a5110c60 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -4317,6 +4317,8 @@ in { mutatormath = callPackage ../development/python-modules/mutatormath { }; + mutesync = callPackage ../development/python-modules/mutesync { }; + mwclient = callPackage ../development/python-modules/mwclient { }; mwdblib = callPackage ../development/python-modules/mwdblib { }; From ba7d8bdb9fc06ad6a1e7beaa75c4ecd89df8d8cd Mon Sep 17 00:00:00 2001 From: Fabian Affolter Date: Thu, 6 May 2021 21:08:44 +0200 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 28b7aed5f397..82e585f19c36 100644 --- a/pkgs/servers/home-assistant/component-packages.nix +++ b/pkgs/servers/home-assistant/component-packages.nix @@ -531,7 +531,7 @@ "mqtt_statestream" = ps: with ps; [ aiohttp-cors paho-mqtt ]; "msteams" = ps: with ps; [ pymsteams ]; "mullvad" = ps: with ps; [ mullvad-api ]; - "mutesync" = ps: with ps; [ ]; # missing inputs: mutesync + "mutesync" = ps: with ps; [ mutesync ]; "mvglive" = ps: with ps; [ PyMVGLive ]; "my" = ps: with ps; [ aiohttp-cors pillow ]; "mychevy" = ps: with ps; [ ]; # missing inputs: mychevy From 382a580b18e3132de280f2ac0d99c9ef3718e560 Mon Sep 17 00:00:00 2001 From: Fabian Affolter Date: Thu, 6 May 2021 21:09:31 +0200 Subject: [PATCH 3/3] home-assistant: enable mutesync 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 4df380e2b5a0..b04d07457f82 100644 --- a/pkgs/servers/home-assistant/default.nix +++ b/pkgs/servers/home-assistant/default.nix @@ -301,6 +301,7 @@ in with py.pkgs; buildPythonApplication rec { "mqtt_room" "mqtt_statestream" "mullvad" + "mutesync" "nexia" "notify" "notion"