2021-06-21 19:29:34 +02:00
|
|
|
{ lib, python3, fetchFromGitHub }:
|
2021-04-13 05:37:17 +02:00
|
|
|
|
2021-07-10 10:31:04 +02:00
|
|
|
python3.pkgs.buildPythonPackage rec {
|
2021-04-13 05:37:17 +02:00
|
|
|
pname = "mautrix-signal";
|
2022-04-21 08:38:36 +02:00
|
|
|
version = "0.3.0";
|
2021-04-13 05:37:17 +02:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
2021-11-17 13:23:31 +01:00
|
|
|
owner = "mautrix";
|
|
|
|
repo = "signal";
|
2022-01-15 14:33:19 +01:00
|
|
|
rev = "v${version}";
|
2022-04-21 08:38:36 +02:00
|
|
|
sha256 = "sha256-khtvfZbqBRQyHteil+H/b3EktjRet6DRcKMHmCClNq0=";
|
2021-04-13 05:37:17 +02:00
|
|
|
};
|
|
|
|
|
2021-07-10 10:31:04 +02:00
|
|
|
propagatedBuildInputs = with python3.pkgs; [
|
2021-04-13 05:37:17 +02:00
|
|
|
CommonMark
|
|
|
|
aiohttp
|
|
|
|
asyncpg
|
|
|
|
attrs
|
|
|
|
mautrix
|
|
|
|
phonenumbers
|
|
|
|
pillow
|
2021-08-26 02:08:48 +02:00
|
|
|
prometheus-client
|
2021-04-13 05:37:17 +02:00
|
|
|
pycryptodome
|
|
|
|
python-olm
|
2022-05-07 01:18:35 +02:00
|
|
|
python-magic
|
2021-04-13 05:37:17 +02:00
|
|
|
qrcode
|
2021-11-03 11:10:50 +01:00
|
|
|
ruamel-yaml
|
2021-04-13 05:37:17 +02:00
|
|
|
unpaddedbase64
|
|
|
|
yarl
|
|
|
|
];
|
|
|
|
|
|
|
|
doCheck = false;
|
|
|
|
|
2022-08-28 13:52:13 +02:00
|
|
|
postPatch = ''
|
|
|
|
substituteInPlace requirements.txt \
|
|
|
|
--replace "asyncpg>=0.20,<0.26" "asyncpg>=0.20" \
|
|
|
|
--replace "mautrix>=0.16.0,<0.17" "mautrix>=0.16.0"
|
|
|
|
'';
|
|
|
|
|
2021-04-13 05:37:17 +02:00
|
|
|
postInstall = ''
|
|
|
|
mkdir -p $out/bin
|
|
|
|
|
|
|
|
# Make a little wrapper for running mautrix-signal with its dependencies
|
|
|
|
echo "$mautrixSignalScript" > $out/bin/mautrix-signal
|
|
|
|
echo "#!/bin/sh
|
2021-05-03 07:51:47 +02:00
|
|
|
exec python -m mautrix_signal \"\$@\"
|
2021-04-13 05:37:17 +02:00
|
|
|
" > $out/bin/mautrix-signal
|
|
|
|
chmod +x $out/bin/mautrix-signal
|
|
|
|
wrapProgram $out/bin/mautrix-signal \
|
2022-09-07 13:43:43 +02:00
|
|
|
--prefix PATH : "${python3}/bin" \
|
|
|
|
--prefix PYTHONPATH : "$PYTHONPATH"
|
2021-04-13 05:37:17 +02:00
|
|
|
'';
|
|
|
|
|
|
|
|
meta = with lib; {
|
2021-11-17 13:23:31 +01:00
|
|
|
homepage = "https://github.com/mautrix/signal";
|
2021-04-13 05:37:17 +02:00
|
|
|
description = "A Matrix-Signal puppeting bridge";
|
|
|
|
license = licenses.agpl3Plus;
|
|
|
|
platforms = platforms.linux;
|
|
|
|
maintainers = with maintainers; [ expipiplus1 ];
|
|
|
|
};
|
|
|
|
}
|