From 07d5520ce2e8f6ae4bad34fc4f8cb1db4004b6da Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Robert=20Sch=C3=BCtz?= Date: Sat, 19 Jun 2021 13:28:15 +0200 Subject: [PATCH] python3Packages.hangups: init at 0.4.14 --- .../python-modules/hangups/default.nix | 70 +++++++++++++++++++ pkgs/top-level/python-packages.nix | 2 + 2 files changed, 72 insertions(+) create mode 100644 pkgs/development/python-modules/hangups/default.nix diff --git a/pkgs/development/python-modules/hangups/default.nix b/pkgs/development/python-modules/hangups/default.nix new file mode 100644 index 000000000000..9c32bc2dd951 --- /dev/null +++ b/pkgs/development/python-modules/hangups/default.nix @@ -0,0 +1,70 @@ +{ lib +, buildPythonPackage +, pythonOlder +, fetchFromGitHub +, configargparse +, aiohttp +, async-timeout +, appdirs +, readlike +, requests +, reparser +, protobuf +, urwid +, mechanicalsoup +, httpretty +, pytestCheckHook +}: + +buildPythonPackage rec { + pname = "hangups"; + version = "0.4.14"; + + disabled = pythonOlder "3.6"; + + src = fetchFromGitHub { + owner = "tdryer"; + repo = "hangups"; + rev = "v${version}"; + sha256 = "14njagpdp13zlaqnwl2mh7fkpnsaqr6wkr4lwh608v06pkwwcwcm"; + }; + + postPatch = '' + substituteInPlace setup.py \ + --replace "protobuf>=3.1.0,<3.16" "protobuf" \ + --replace "MechanicalSoup>=0.6.0,<0.13" "MechanicalSoup" + ''; + + propagatedBuildInputs = [ + configargparse + aiohttp + async-timeout + appdirs + readlike + requests + reparser + protobuf + urwid + mechanicalsoup + ]; + + checkInputs = [ + httpretty + pytestCheckHook + ]; + + pythonImportsCheck = [ + "hangups" + "hangups.client" + "hangups.event" + "hangups.parsers" + "hangups.user" + ]; + + meta = with lib; { + description = "The first third-party instant messaging client for Google Hangouts"; + homepage = "https://github.com/tdryer/hangups"; + license = licenses.mit; + maintainers = with maintainers; [ dotlambda ]; + }; +} diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index 6df69b987c8b..58f9c3d0e023 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -3174,6 +3174,8 @@ in { handout = callPackage ../development/python-modules/handout { }; + hangups = callPackage ../development/python-modules/hangups { }; + hap-python = callPackage ../development/python-modules/hap-python { }; hass-nabucasa = callPackage ../development/python-modules/hass-nabucasa { };