diff options
author | makefu <github@syntax-fehler.de> | 2023-07-28 22:24:15 +0200 |
---|---|---|
committer | makefu <github@syntax-fehler.de> | 2023-07-28 22:24:15 +0200 |
commit | 060a8f28fa1fc648bdf66afb31a5d1efac868837 (patch) | |
tree | 2b354eacc7897365ee45244fe7a51720e0d0333f /makefu/5pkgs/kalauerbot | |
parent | cbfcc890e3b76d942b927809bf981a5fa7289e6a (diff) |
makefu: move out to own repo, add vacation-note
Diffstat (limited to 'makefu/5pkgs/kalauerbot')
-rw-r--r-- | makefu/5pkgs/kalauerbot/badsync.patch | 14 | ||||
-rw-r--r-- | makefu/5pkgs/kalauerbot/default.nix | 23 | ||||
-rw-r--r-- | makefu/5pkgs/kalauerbot/matrixbot.patch | 12 | ||||
-rw-r--r-- | makefu/5pkgs/kalauerbot/python-matrixbot.nix | 31 | ||||
-rw-r--r-- | makefu/5pkgs/kalauerbot/translate.patch | 17 |
5 files changed, 0 insertions, 97 deletions
diff --git a/makefu/5pkgs/kalauerbot/badsync.patch b/makefu/5pkgs/kalauerbot/badsync.patch deleted file mode 100644 index 842129b94..000000000 --- a/makefu/5pkgs/kalauerbot/badsync.patch +++ /dev/null @@ -1,14 +0,0 @@ -diff --git a/matrix_client/client.py b/matrix_client/client.py -index af0e08f..f848c4f 100644 ---- a/matrix_client/client.py -+++ b/matrix_client/client.py -@@ -471,7 +471,7 @@ class MatrixClient(object): - self._sync(timeout_ms) - - def listen_forever(self, timeout_ms=30000, exception_handler=None, -- bad_sync_timeout=5): -+ bad_sync_timeout=61): - """ Keep listening for events forever. - - Args: - diff --git a/makefu/5pkgs/kalauerbot/default.nix b/makefu/5pkgs/kalauerbot/default.nix deleted file mode 100644 index 42de86d50..000000000 --- a/makefu/5pkgs/kalauerbot/default.nix +++ /dev/null @@ -1,23 +0,0 @@ -{ stdenv, lib, python3, fetchgit }: -python3.pkgs.buildPythonPackage rec { -name = "kalauerbot"; -rev = "f244b35"; - src = fetchgit { - url = "http://cgit.euer.krebsco.de/kalauerbot"; - inherit rev; - sha256 = "08y4rlsil9p0726wlpkw2lpmkcnckaj3zqsifbj5w6rgivp6ly0v"; - }; - propagatedBuildInputs = with python3.pkgs;[ - (callPackage ./python-matrixbot.nix { - matrix-client = (lib.overrideDerivation matrix-client (self: { - patches = [ ./badsync.patch ]; - })); - }) - - (lib.overrideDerivation googletrans (self: { - patches = [ ./translate.patch ]; - })) - ]; - checkInputs = [ python3.pkgs.black ]; -} - diff --git a/makefu/5pkgs/kalauerbot/matrixbot.patch b/makefu/5pkgs/kalauerbot/matrixbot.patch deleted file mode 100644 index 2b9bbbea1..000000000 --- a/makefu/5pkgs/kalauerbot/matrixbot.patch +++ /dev/null @@ -1,12 +0,0 @@ -diff --git a/matrixbot/matrixbot.py b/matrixbot/matrixbot.py -index 8e5598c..d8c23d2 100644 ---- a/matrixbot/matrixbot.py -+++ b/matrixbot/matrixbot.py -@@ -51,7 +51,6 @@ class MatrixBot: - self.user = None - if self.token is not None and self.user_id is not None: - self.user = self.client.get_user(self.user_id) -- self.user.set_display_name(self.display_name) - self.init_rooms(self.client.rooms) - self.invite_listener = self.client.add_invite_listener(self.handle_invite) - self.cache = Cache(dbfile=cache_db) diff --git a/makefu/5pkgs/kalauerbot/python-matrixbot.nix b/makefu/5pkgs/kalauerbot/python-matrixbot.nix deleted file mode 100644 index 7bc5aa7f3..000000000 --- a/makefu/5pkgs/kalauerbot/python-matrixbot.nix +++ /dev/null @@ -1,31 +0,0 @@ -{ lib -, buildPythonPackage -, fetchPypi -, markdown -, matrix-client -}: - -buildPythonPackage rec { - pname = "python-matrixbot"; - version = "0.0.7"; - CI_COMMIT_TAG = version; - - #src = ./python-matrixbot; - src = fetchPypi { - inherit pname version; - sha256 = "9412981b14ff3ab7ffbb1bfc1691758113ab8d71f731b3093d8808c286b69c71"; - }; - patches = [ ./matrixbot.patch ]; - - propagatedBuildInputs = [ - markdown - matrix-client - ]; - - meta = with lib; { - description = "A basic bot for Matrix"; - homepage = https://gitlab.com/gibberfish/python-matrixbot; - license = licenses.mit; - # maintainers = [ maintainers. ]; - }; -} diff --git a/makefu/5pkgs/kalauerbot/translate.patch b/makefu/5pkgs/kalauerbot/translate.patch deleted file mode 100644 index 6ff820726..000000000 --- a/makefu/5pkgs/kalauerbot/translate.patch +++ /dev/null @@ -1,17 +0,0 @@ -diff --git a/googletrans/client.py b/googletrans/client.py -index 89c2237..c203b44 100644 ---- a/googletrans/client.py -+++ b/googletrans/client.py -@@ -190,6 +190,13 @@ class Translator(object): - pass - if not PY3 and isinstance(pron, unicode) and isinstance(origin, str): # pragma: nocover - origin = origin.decode('utf-8') -+ -+ if pron is None: -+ try: -+ pron = data[0][2][2] -+ except: # pragma: nocover -+ pass -+ - if dest in EXCLUDES and pron == origin: - pron = translated |