mautrix-signal: use pythonRelaxDepsHook

This commit is contained in:
Nick Cao 2023-01-31 13:52:58 +08:00
parent 54468447bb
commit e139718d5f
No known key found for this signature in database

View file

@ -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