Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

mautrix-telegram: add postgresql database driver #94467

Merged
merged 1 commit into from
Aug 1, 2020
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 10 additions & 3 deletions pkgs/servers/mautrix-telegram/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,14 @@

with python3.pkgs;

buildPythonPackage rec {
let
# officially supported database drivers
dbDrivers = [
psycopg2
# sqlite driver is already shipped with python by default
];

in buildPythonPackage rec {
pname = "mautrix-telegram";
version = "0.8.2";
disabled = pythonOlder "3.6";
Expand Down Expand Up @@ -32,7 +39,7 @@ buildPythonPackage rec {
pillow
lxml
setuptools
];
] ++ 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`
Expand All @@ -41,7 +48,7 @@ buildPythonPackage rec {
# Hence we need to patch away `alembic` from `mautrix-telegram` and create an `alembic`
# which has `mautrix-telegram` in its environment.
passthru.alembic = alembic.overrideAttrs (old: {
propagatedBuildInputs = old.propagatedBuildInputs ++ [
propagatedBuildInputs = old.propagatedBuildInputs ++ dbDrivers ++ [
mautrix-telegram
];
});
Expand Down