summary refs log tree commit diff
path: root/pkgs/servers/mautrix-telegram/default.nix
diff options
context:
space:
mode:
Diffstat (limited to 'pkgs/servers/mautrix-telegram/default.nix')
-rw-r--r--pkgs/servers/mautrix-telegram/default.nix30
1 files changed, 20 insertions, 10 deletions
diff --git a/pkgs/servers/mautrix-telegram/default.nix b/pkgs/servers/mautrix-telegram/default.nix
index bf00462875b..f54657db38f 100644
--- a/pkgs/servers/mautrix-telegram/default.nix
+++ b/pkgs/servers/mautrix-telegram/default.nix
@@ -1,24 +1,34 @@
 { lib, python3, mautrix-telegram, fetchFromGitHub }:
 
-with python3.pkgs;
-
 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
-  dbDrivers = [
+  dbDrivers = with python.pkgs; [
     psycopg2
     # sqlite driver is already shipped with python by default
   ];
 
-in buildPythonPackage rec {
+in python.pkgs.buildPythonPackage rec {
   pname = "mautrix-telegram";
-  version = "0.9.0";
-  disabled = pythonOlder "3.7";
+  version = "0.10.0";
+  disabled = python.pythonOlder "3.7";
 
   src = fetchFromGitHub {
     owner = "tulir";
     repo = pname;
     rev = "v${version}";
-    sha256 = "1543ljjl3jg3ayid7ifi4bamqh4gq85pmlbs3m8i7phjbbm7g9dn";
+    sha256 = "sha256-lLVKD+/pKqs8oWBdyL+R1lk22LqQOC9nbMlxhCK39xA=";
   };
 
   patches = [ ./0001-Re-add-entrypoint.patch ./0002-Don-t-depend-on-pytest-runner.patch ];
@@ -26,7 +36,7 @@ in buildPythonPackage rec {
     sed -i -e '/alembic>/d' requirements.txt
   '';
 
-  propagatedBuildInputs = [
+  propagatedBuildInputs = with python.pkgs; [
     Mako
     aiohttp
     mautrix
@@ -47,7 +57,7 @@ in 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: {
+  passthru.alembic = python.pkgs.alembic.overrideAttrs (old: {
     propagatedBuildInputs = old.propagatedBuildInputs ++ dbDrivers ++ [
       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
   # those, so it's safe to assume that this part of the software is abandoned.
   doCheck = false;
-  checkInputs = [
+  checkInputs = with python.pkgs; [
     pytest
     pytest-mock
     pytest-asyncio