From f1d1ed4f0221d89d5e221c26114a14fe138e8982 Mon Sep 17 00:00:00 2001 From: Yuka Date: Sat, 7 Aug 2021 12:38:46 +0200 Subject: [PATCH] mautrix-telegram: add inputs for E2BE support (#132979) https://docs.mau.fi/bridges/general/end-to-bridge-encryption.html --- pkgs/servers/mautrix-telegram/default.nix | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/pkgs/servers/mautrix-telegram/default.nix b/pkgs/servers/mautrix-telegram/default.nix index f54657db38f..41d0d5b0467 100644 --- a/pkgs/servers/mautrix-telegram/default.nix +++ b/pkgs/servers/mautrix-telegram/default.nix @@ -1,4 +1,6 @@ -{ lib, python3, mautrix-telegram, fetchFromGitHub }: +{ lib, python3, mautrix-telegram, fetchFromGitHub +, withE2BE ? true +}: let python = python3.override { @@ -36,7 +38,7 @@ in python.pkgs.buildPythonPackage rec { sed -i -e '/alembic>/d' requirements.txt ''; - propagatedBuildInputs = with python.pkgs; [ + propagatedBuildInputs = with python.pkgs; ([ Mako aiohttp mautrix @@ -49,7 +51,12 @@ in python.pkgs.buildPythonPackage rec { pillow lxml setuptools - ] ++ dbDrivers; + ] ++ lib.optionals withE2BE [ + asyncpg + python-olm + pycryptodome + unpaddedbase64 + ]) ++ dbDrivers; # `alembic` (a database migration tool) is only needed for the initial setup, # and not needed during the actual runtime. However `alembic` requires `mautrix-telegram`