diff --git a/pkgs/development/python-modules/mautrix/default.nix b/pkgs/development/python-modules/mautrix/default.nix index a150c69466e89..1746fa01dbe97 100644 --- a/pkgs/development/python-modules/mautrix/default.nix +++ b/pkgs/development/python-modules/mautrix/default.nix @@ -19,6 +19,8 @@ aiosqlite, asyncpg, ruamel-yaml, + + withOlm ? false, }: buildPythonPackage rec { @@ -41,7 +43,7 @@ buildPythonPackage rec { aiohttp attrs yarl - ]; + ] ++ lib.optionals withOlm optional-dependencies.encryption; optional-dependencies = { detect_mimetype = [ python-magic ]; @@ -58,7 +60,9 @@ buildPythonPackage rec { aiosqlite asyncpg ruamel-yaml - ] ++ passthru.optional-dependencies.encryption; + ]; + + disabledTestPaths = lib.optionals (!withOlm) [ "mautrix/crypto/" ]; pythonImportsCheck = [ "mautrix" ]; diff --git a/pkgs/servers/mautrix-facebook/default.nix b/pkgs/servers/mautrix-facebook/default.nix index b66ebaa47b539..72c55424aca20 100644 --- a/pkgs/servers/mautrix-facebook/default.nix +++ b/pkgs/servers/mautrix-facebook/default.nix @@ -21,7 +21,7 @@ python3.pkgs.buildPythonPackage rec { aiohttp asyncpg commonmark - mautrix + (mautrix.override { withOlm = true; }) paho-mqtt pillow prometheus-client diff --git a/pkgs/servers/mautrix-googlechat/default.nix b/pkgs/servers/mautrix-googlechat/default.nix index 3c5861f16647b..3be7c30895d02 100644 --- a/pkgs/servers/mautrix-googlechat/default.nix +++ b/pkgs/servers/mautrix-googlechat/default.nix @@ -55,7 +55,7 @@ commonmark python-magic protobuf - mautrix + (mautrix.override { withOlm = enableE2be; }) ] ++ lib.optionals enableE2be passthru.optional-dependencies.e2be ++ lib.optionals enableMetrics passthru.optional-dependencies.metrics ++ lib.optionals enableSqlite passthru.optional-dependencies.sqlite; diff --git a/pkgs/servers/mautrix-telegram/default.nix b/pkgs/servers/mautrix-telegram/default.nix index 59067fd516019..4c240f1654af8 100644 --- a/pkgs/servers/mautrix-telegram/default.nix +++ b/pkgs/servers/mautrix-telegram/default.nix @@ -42,7 +42,7 @@ python.pkgs.buildPythonPackage rec { commonmark aiohttp yarl - mautrix + (mautrix.override { withOlm = withE2BE; }) tulir-telethon asyncpg mako diff --git a/pkgs/tools/networking/maubot/default.nix b/pkgs/tools/networking/maubot/default.nix index 7794395180db1..98ed4ddf795ec 100644 --- a/pkgs/tools/networking/maubot/default.nix +++ b/pkgs/tools/networking/maubot/default.nix @@ -61,7 +61,7 @@ let propagatedBuildInputs = with python.pkgs; [ setuptools # requirements.txt - mautrix + (mautrix.override { withOlm = encryptionSupport; }) aiohttp yarl sqlalchemy