about summary refs log tree commit diff
path: root/pkgs/servers/mautrix-signal
diff options
context:
space:
mode:
authorNick Cao <nickcao@nichi.co>2023-01-31 13:52:58 +0800
committerNick Cao <nickcao@nichi.co>2023-01-31 13:52:58 +0800
commite139718d5f109e24e4ba4fea5120fc7708f8e2ea (patch)
treeeca8bb1b1964565d829111098623f8f2de2f0af2 /pkgs/servers/mautrix-signal
parent54468447bbab6ff86df09ed2aa5c857b6dc2fb00 (diff)
mautrix-signal: use pythonRelaxDepsHook
Diffstat (limited to 'pkgs/servers/mautrix-signal')
-rw-r--r--pkgs/servers/mautrix-signal/default.nix20
1 files changed, 14 insertions, 6 deletions
diff --git a/pkgs/servers/mautrix-signal/default.nix b/pkgs/servers/mautrix-signal/default.nix
index 7aada1e2eed5b..8ff6f1d36694b 100644
--- a/pkgs/servers/mautrix-signal/default.nix
+++ b/pkgs/servers/mautrix-signal/default.nix
@@ -11,6 +11,20 @@ python3.pkgs.buildPythonPackage rec {
     sha256 = "sha256-UbetU1n9zD/mVFaJc9FECDq/Zell1TI/aYPsGXGB8Js=";
   };
 
+  postPatch = ''
+    # the version mangling in mautrix_signal/get_version.py interacts badly with pythonRelaxDepsHook
+    substituteInPlace setup.py \
+      --replace 'version=version' 'version="${version}"'
+  '';
+
+  nativeBuildInputs = with python3.pkgs; [
+    pythonRelaxDepsHook
+  ];
+
+  pythonRelaxDeps = [
+    "mautrix"
+  ];
+
   propagatedBuildInputs = with python3.pkgs; [
     CommonMark
     aiohttp
@@ -31,12 +45,6 @@ python3.pkgs.buildPythonPackage rec {
 
   doCheck = false;
 
-  postPatch = ''
-    substituteInPlace requirements.txt \
-      --replace "asyncpg>=0.20,<0.26" "asyncpg>=0.20" \
-      --replace "mautrix>=0.16.0,<0.17" "mautrix>=0.16.0"
-  '';
-
   postInstall = ''
     mkdir -p $out/bin