1
0
Fork 1
mirror of https://github.com/NixOS/nixpkgs.git synced 2024-11-21 13:10:33 +00:00

mautrix-telegram: remove alembic passthru

alembic is not used anymore since mautrix-telegram 0.11.0
This commit is contained in:
Yureka 2021-12-29 19:40:20 +01:00 committed by Yuka
parent ce6f80b126
commit 0630d5c381

View file

@ -37,7 +37,6 @@ in python.pkgs.buildPythonPackage rec {
patches = [ ./0001-Re-add-entrypoint.patch ];
postPatch = ''
sed -i -e '/alembic>/d' requirements.txt
substituteInPlace requirements.txt \
--replace "telethon>=1.22,<1.23" "telethon"
'';
@ -64,18 +63,6 @@ in python.pkgs.buildPythonPackage rec {
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`
# in its environment to create a database schema from all models.
#
# Hence we need to patch away `alembic` from `mautrix-telegram` and create an `alembic`
# which has `mautrix-telegram` in its environment.
passthru.alembic = python.pkgs.alembic.overrideAttrs (old: {
propagatedBuildInputs = old.propagatedBuildInputs ++ dbDrivers ++ [
mautrix-telegram
];
});
# Tests are broken and throw the following for every test:
# TypeError: 'Mock' object is not subscriptable
#