nixpkgs/pkgs/servers/mautrix-signal/default.nix

56 lines
1.3 KiB
Nix
Raw Normal View History

2021-06-21 17:29:34 +00:00
{ lib, python3, fetchFromGitHub }:
python3.pkgs.buildPythonPackage rec {
pname = "mautrix-signal";
version = "unstable-2022-01-13";
src = fetchFromGitHub {
2021-11-17 12:23:31 +00:00
owner = "mautrix";
repo = "signal";
rev = "e015852a9969ac169e215c80872199ba3f3d838f";
sha256 = "sha256-7+0JubSGmQDMr7n1PK6i7homR1WknMz9ikC4164XmMo=";
};
propagatedBuildInputs = with python3.pkgs; [
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
exec python -m mautrix_signal \"\$@\"
" > $out/bin/mautrix-signal
chmod +x $out/bin/mautrix-signal
wrapProgram $out/bin/mautrix-signal \
--set PATH ${python3}/bin \
--set PYTHONPATH "$PYTHONPATH"
'';
meta = with lib; {
2021-11-17 12:23:31 +00:00
homepage = "https://github.com/mautrix/signal";
description = "A Matrix-Signal puppeting bridge";
license = licenses.agpl3Plus;
platforms = platforms.linux;
maintainers = with maintainers; [ expipiplus1 ];
};
}