Skip to content

Commit

Permalink
python3Packages.mautrix: add withOlm flag
Browse files Browse the repository at this point in the history
Closes: NixOS#336052
  • Loading branch information
emilazy committed Sep 1, 2024
1 parent 13b44b3 commit 832d177
Show file tree
Hide file tree
Showing 5 changed files with 10 additions and 6 deletions.
8 changes: 6 additions & 2 deletions pkgs/development/python-modules/mautrix/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,8 @@
aiosqlite,
asyncpg,
ruamel-yaml,

withOlm ? false,
}:

buildPythonPackage rec {
Expand All @@ -41,7 +43,7 @@ buildPythonPackage rec {
aiohttp
attrs
yarl
];
] ++ lib.optionals withOlm optional-dependencies.encryption;

optional-dependencies = {
detect_mimetype = [ python-magic ];
Expand All @@ -58,7 +60,9 @@ buildPythonPackage rec {
aiosqlite
asyncpg
ruamel-yaml
] ++ passthru.optional-dependencies.encryption;
];

disabledTestPaths = lib.optionals (!withOlm) [ "mautrix/crypto/" ];

pythonImportsCheck = [ "mautrix" ];

Expand Down
2 changes: 1 addition & 1 deletion pkgs/servers/mautrix-facebook/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ python3.pkgs.buildPythonPackage rec {
aiohttp
asyncpg
commonmark
mautrix
(mautrix.override { withOlm = true; })
paho-mqtt
pillow
prometheus-client
Expand Down
2 changes: 1 addition & 1 deletion pkgs/servers/mautrix-googlechat/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
2 changes: 1 addition & 1 deletion pkgs/servers/mautrix-telegram/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ python.pkgs.buildPythonPackage rec {
commonmark
aiohttp
yarl
mautrix
(mautrix.override { withOlm = withE2BE; })
tulir-telethon
asyncpg
mako
Expand Down
2 changes: 1 addition & 1 deletion pkgs/tools/networking/maubot/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ let
propagatedBuildInputs = with python.pkgs; [
setuptools
# requirements.txt
mautrix
(mautrix.override { withOlm = encryptionSupport; })
aiohttp
yarl
sqlalchemy
Expand Down

0 comments on commit 832d177

Please sign in to comment.