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";
|
2021-07-10 10:31:04 +02:00
|
|
|
version = "unstable-2021-07-01";
|
2021-04-13 05:37:17 +02:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "tulir";
|
|
|
|
repo = "mautrix-signal";
|
2021-07-10 10:31:04 +02:00
|
|
|
rev = "56eb24412fcafb4836f29375fba9cc6db1715d6f";
|
|
|
|
sha256 = "10nbfl48yb7h23znkxvkqh1dgp2xgldvxsigwfmwa1qbq0l4dljl";
|
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
|
|
|
|
prometheus_client
|
|
|
|
pycryptodome
|
|
|
|
python-olm
|
|
|
|
python_magic
|
|
|
|
qrcode
|
|
|
|
ruamel_yaml
|
|
|
|
unpaddedbase64
|
|
|
|
yarl
|
|
|
|
];
|
|
|
|
|
|
|
|
doCheck = false;
|
|
|
|
|
|
|
|
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 \
|
2021-07-10 10:31:04 +02:00
|
|
|
--set PATH ${python3}/bin \
|
2021-04-13 05:37:17 +02:00
|
|
|
--set PYTHONPATH "$PYTHONPATH"
|
|
|
|
'';
|
|
|
|
|
|
|
|
meta = with lib; {
|
|
|
|
homepage = "https://github.com/tulir/mautrix-signal";
|
|
|
|
description = "A Matrix-Signal puppeting bridge";
|
|
|
|
license = licenses.agpl3Plus;
|
|
|
|
platforms = platforms.linux;
|
|
|
|
maintainers = with maintainers; [ expipiplus1 ];
|
|
|
|
};
|
|
|
|
}
|