2021-06-21 18:29:34 +01:00
|
|
|
{ lib, python3, fetchFromGitHub }:
|
2021-04-13 04:37:17 +01:00
|
|
|
|
2021-07-10 09:31:04 +01:00
|
|
|
python3.pkgs.buildPythonPackage rec {
|
2021-04-13 04:37:17 +01:00
|
|
|
pname = "mautrix-signal";
|
2021-08-12 21:41:23 +01:00
|
|
|
version = "unstable-2021-08-12";
|
2021-04-13 04:37:17 +01:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "tulir";
|
|
|
|
repo = "mautrix-signal";
|
2021-08-12 21:41:23 +01:00
|
|
|
rev = "a592baaaa6c9ab7ec29edc84f069b9e9e2fc1b03";
|
|
|
|
sha256 = "0rvidf4ah23x8m7k7hbkwm2xrs838wnli99gh99b5hr6fqmacbwl";
|
2021-04-13 04:37:17 +01:00
|
|
|
};
|
|
|
|
|
2021-07-10 09:31:04 +01:00
|
|
|
propagatedBuildInputs = with python3.pkgs; [
|
2021-04-13 04:37:17 +01:00
|
|
|
CommonMark
|
|
|
|
aiohttp
|
|
|
|
asyncpg
|
|
|
|
attrs
|
|
|
|
mautrix
|
|
|
|
phonenumbers
|
|
|
|
pillow
|
2021-08-26 01:08:48 +01:00
|
|
|
prometheus-client
|
2021-04-13 04:37:17 +01:00
|
|
|
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 06:51:47 +01:00
|
|
|
exec python -m mautrix_signal \"\$@\"
|
2021-04-13 04:37:17 +01:00
|
|
|
" > $out/bin/mautrix-signal
|
|
|
|
chmod +x $out/bin/mautrix-signal
|
|
|
|
wrapProgram $out/bin/mautrix-signal \
|
2021-07-10 09:31:04 +01:00
|
|
|
--set PATH ${python3}/bin \
|
2021-04-13 04:37:17 +01: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 ];
|
|
|
|
};
|
|
|
|
}
|