Merge pull request #94467 from pacien/mautrix-telegram-postgres

mautrix-telegram: add postgresql database driver
This commit is contained in:
Maximilian Bosch
2020-08-01 21:46:24 +02:00
committed by GitHub
+10 -3
View File
@@ -2,7 +2,14 @@
with python3.pkgs; 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"; pname = "mautrix-telegram";
version = "0.8.2"; version = "0.8.2";
disabled = pythonOlder "3.6"; disabled = pythonOlder "3.6";
@@ -32,7 +39,7 @@ buildPythonPackage rec {
pillow pillow
lxml lxml
setuptools setuptools
]; ] ++ dbDrivers;
# `alembic` (a database migration tool) is only needed for the initial setup, # `alembic` (a database migration tool) is only needed for the initial setup,
# and not needed during the actual runtime. However `alembic` requires `mautrix-telegram` # and not needed during the actual runtime. However `alembic` requires `mautrix-telegram`
@@ -41,7 +48,7 @@ buildPythonPackage rec {
# Hence we need to patch away `alembic` from `mautrix-telegram` and create an `alembic` # Hence we need to patch away `alembic` from `mautrix-telegram` and create an `alembic`
# which has `mautrix-telegram` in its environment. # which has `mautrix-telegram` in its environment.
passthru.alembic = alembic.overrideAttrs (old: { passthru.alembic = alembic.overrideAttrs (old: {
propagatedBuildInputs = old.propagatedBuildInputs ++ [ propagatedBuildInputs = old.propagatedBuildInputs ++ dbDrivers ++ [
mautrix-telegram mautrix-telegram
]; ];
}); });