mautrix-telegram: use sqlalchemy 1.3
This commit is contained in:
parent
af2d542fb5
commit
5a2945b6ed
@ -1,18 +1,28 @@
|
|||||||
{ lib, python3, mautrix-telegram, fetchFromGitHub }:
|
{ lib, python3, mautrix-telegram, fetchFromGitHub }:
|
||||||
|
|
||||||
with python3.pkgs;
|
|
||||||
|
|
||||||
let
|
let
|
||||||
|
python = python3.override {
|
||||||
|
packageOverrides = self: super: {
|
||||||
|
sqlalchemy = super.sqlalchemy.overridePythonAttrs (oldAttrs: rec {
|
||||||
|
version = "1.3.24";
|
||||||
|
src = oldAttrs.src.override {
|
||||||
|
inherit version;
|
||||||
|
sha256 = "ebbb777cbf9312359b897bf81ba00dae0f5cb69fba2a18265dcc18a6f5ef7519";
|
||||||
|
};
|
||||||
|
});
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
# officially supported database drivers
|
# officially supported database drivers
|
||||||
dbDrivers = [
|
dbDrivers = with python.pkgs; [
|
||||||
psycopg2
|
psycopg2
|
||||||
# sqlite driver is already shipped with python by default
|
# sqlite driver is already shipped with python by default
|
||||||
];
|
];
|
||||||
|
|
||||||
in buildPythonPackage rec {
|
in python.pkgs.buildPythonPackage rec {
|
||||||
pname = "mautrix-telegram";
|
pname = "mautrix-telegram";
|
||||||
version = "0.9.0";
|
version = "0.9.0";
|
||||||
disabled = pythonOlder "3.7";
|
disabled = python.pythonOlder "3.7";
|
||||||
|
|
||||||
src = fetchFromGitHub {
|
src = fetchFromGitHub {
|
||||||
owner = "tulir";
|
owner = "tulir";
|
||||||
@ -26,7 +36,7 @@ in buildPythonPackage rec {
|
|||||||
sed -i -e '/alembic>/d' requirements.txt
|
sed -i -e '/alembic>/d' requirements.txt
|
||||||
'';
|
'';
|
||||||
|
|
||||||
propagatedBuildInputs = [
|
propagatedBuildInputs = with python.pkgs; [
|
||||||
Mako
|
Mako
|
||||||
aiohttp
|
aiohttp
|
||||||
mautrix
|
mautrix
|
||||||
@ -47,7 +57,7 @@ in 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 = python.pkgs.alembic.overrideAttrs (old: {
|
||||||
propagatedBuildInputs = old.propagatedBuildInputs ++ dbDrivers ++ [
|
propagatedBuildInputs = old.propagatedBuildInputs ++ dbDrivers ++ [
|
||||||
mautrix-telegram
|
mautrix-telegram
|
||||||
];
|
];
|
||||||
@ -59,7 +69,7 @@ in buildPythonPackage rec {
|
|||||||
# The tests were touched the last time in 2019 and upstream CI doesn't even build
|
# The tests were touched the last time in 2019 and upstream CI doesn't even build
|
||||||
# those, so it's safe to assume that this part of the software is abandoned.
|
# those, so it's safe to assume that this part of the software is abandoned.
|
||||||
doCheck = false;
|
doCheck = false;
|
||||||
checkInputs = [
|
checkInputs = with python.pkgs; [
|
||||||
pytest
|
pytest
|
||||||
pytest-mock
|
pytest-mock
|
||||||
pytest-asyncio
|
pytest-asyncio
|
||||||
|
Loading…
Reference in New Issue
Block a user