Change:
<del> { lib, python3, fetchFromGitHub }: </del> <ins> { lib, buildGoModule, fetchFromGitHub, olm, libsignal-ffi }: </ins> <del> python3.pkgs.buildPythonPackage rec { </del> <ins> buildGoModule { </ins> pname = "mautrix-signal"; <del> version = "0.4.3"; </del> <ins> # mautrix-signal's latest released version v0.4.3 still uses the Python codebase # which is broken for new devices, see https://github.com/mautrix/signal/issues/388. # The new Go version fixes this by using the official libsignal as a library and # can be upgraded to directly from the Python version. version = "unstable-2023-12-30"; </ins> src = fetchFromGitHub { owner = "mautrix"; repo = "signal"; <del> rev = "refs/tags/v${version}"; sha256 = "sha256-QShyuwHiWRcP1hGkvCQfixvoUQ/FXr2DYC5VrcMKX48="; </del> <ins> rev = "6abe80e6c79b31b5dc37a484b65d346a1ffd4f05"; hash = "sha256-EDSP+kU0EmIaYbAB/hxAUTEay+H5aqn9ovBQFZg6wJk="; </ins> }; <del> 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" </del> <ins> buildInputs = [ olm # must match the version used in https://github.com/mautrix/signal/tree/main/pkg/libsignalgo # see https://github.com/mautrix/signal/issues/401 libsignal-ffi </ins> ]; <del> propagatedBuildInputs = with python3.pkgs; [ commonmark aiohttp aiosqlite asyncpg attrs commonmark mautrix phonenumbers pillow prometheus-client pycryptodome python-olm python-magic qrcode ruamel-yaml unpaddedbase64 yarl ]; </del> <ins> vendorHash = "sha256-f3sWX+mBouuxVKu+fZIYTWLXT64fllUWpcUYAxjzQpI="; </ins> doCheck = false; <del> 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  --prefix PATH : "${python3}/bin"  --prefix PYTHONPATH : "$PYTHONPATH" ''; </del> meta = with lib; { homepage = "https://github.com/mautrix/signal"; description = "A Matrix-Signal puppeting bridge"; license = licenses.agpl3Plus; <del> platforms = platforms.linux; maintainers = with maintainers; [ expipiplus1 ]; </del> <ins> maintainers = with maintainers; [ expipiplus1 niklaskorz ma27 ]; </ins> mainProgram = "mautrix-signal"; }; }

Discussion:
crashes during startup with: Judging by this upstream issue which has the same stack trace, the crash is caused by using an incompatible version of the dependency with . specifies but currently in nixpkgs it's provided with as a dependency. It seems that an older version should be used to fix the crash. Steps to reproduce the behavior: might somehow be specific to my (judging by the stack trace, it might be related to e2ee), so here's mine: in parts in the provided mautrix-signal No crash Please run and paste the result.
Hello I've learned that the mautrix-signal python package is no longer going to receive any updates as they are currently rewriting it in Go, so a fix from them (to use newer mautrix) will not happen soon (I mean never, just that the go port wont have that particular issue) Until the go port is ready to be used, I've made the below override for myself, which effectively undoes commit for the mautrix dependency