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/development/python-modules/readlike/default.nix b/pkgs/development/python-modules/readlike/default.nix new file mode 100644 index 000000000000..f2e3d11e7edd --- /dev/null +++ b/pkgs/development/python-modules/readlike/default.nix @@ -0,0 +1,28 @@ +{ lib +, buildPythonPackage +, fetchFromGitHub +, python +}: + +buildPythonPackage rec { + pname = "readlike"; + version = "0.1.3"; + + src = fetchFromGitHub { + owner = "jangler"; + repo = "readlike"; + rev = version; + sha256 = "1mw8j8ads8hqdbz42siwpffi4wi5s33z9g14a5c2i7vxp8m68qc1"; + }; + + checkPhase = '' + ${python.interpreter} -m unittest discover -s tests + ''; + + meta = with lib; { + description = "GNU Readline-like line editing module"; + homepage = "https://github.com/jangler/readlike"; + license = licenses.mit; + maintainers = with maintainers; [ dotlambda ]; + }; +} diff --git a/pkgs/development/python-modules/reparser/default.nix b/pkgs/development/python-modules/reparser/default.nix new file mode 100644 index 000000000000..90d701a0e465 --- /dev/null +++ b/pkgs/development/python-modules/reparser/default.nix @@ -0,0 +1,31 @@ +{ lib +, buildPythonPackage +, isPy27 +, fetchFromGitHub +}: + +buildPythonPackage rec { + pname = "reparser"; + version = "1.4.3"; + + disabled = isPy27; + + src = fetchFromGitHub { + owner = "xmikos"; + repo = "reparser"; + rev = "v${version}"; + sha256 = "04v7h52wny0j2qj37501nk33j0s4amm134kagdicx2is49zylzq1"; + }; + + # no tests implemented + doCheck = false; + + pythonImportsCheck = [ "reparser" ]; + + meta = with lib; { + description = "Simple regex-based lexer/parser for inline markup"; + homepage = "https://github.com/xmikos/reparser"; + license = licenses.mit; + maintainers = with maintainers; [ dotlambda ]; + }; +} diff --git a/pkgs/servers/home-assistant/component-packages.nix b/pkgs/servers/home-assistant/component-packages.nix index 159b77e8b779..d8ba038c0007 100644 --- a/pkgs/servers/home-assistant/component-packages.nix +++ b/pkgs/servers/home-assistant/component-packages.nix @@ -336,7 +336,7 @@ "gtfs" = ps: with ps; [ pygtfs ]; "guardian" = ps: with ps; [ aioguardian ]; "habitica" = ps: with ps; [ habitipy ]; - "hangouts" = ps: with ps; [ ]; # missing inputs: hangups + "hangouts" = ps: with ps; [ hangups ]; "harman_kardon_avr" = ps: with ps; [ ]; # missing inputs: hkavr "harmony" = ps: with ps; [ aioharmony ]; "hassio" = ps: with ps; [ aiohttp-cors home-assistant-frontend pillow ]; diff --git a/pkgs/servers/home-assistant/default.nix b/pkgs/servers/home-assistant/default.nix index b0ba15e88203..3873692c3a1c 100644 --- a/pkgs/servers/home-assistant/default.nix +++ b/pkgs/servers/home-assistant/default.nix @@ -436,6 +436,7 @@ in with py.pkgs; buildPythonApplication rec { "growatt_server" "guardian" "habitica" + "hangouts" "harmony" "hassio" "hddtemp" diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index 9adf1f901297..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 { }; @@ -7313,6 +7315,8 @@ in { readchar = callPackage ../development/python-modules/readchar { }; + readlike = callPackage ../development/python-modules/readlike { }; + readme = callPackage ../development/python-modules/readme { }; readme_renderer = callPackage ../development/python-modules/readme_renderer { }; @@ -7351,6 +7355,8 @@ in { rencode = callPackage ../development/python-modules/rencode { }; + reparser = callPackage ../development/python-modules/reparser { }; + repeated_test = callPackage ../development/python-modules/repeated_test { }; repocheck = callPackage ../development/python-modules/repocheck { };