2024-08-28 00:15:47 +00:00
|
|
|
{
|
|
|
|
lib,
|
|
|
|
buildGoModule,
|
|
|
|
fetchFromGitHub,
|
|
|
|
olm,
|
|
|
|
libsignal-ffi,
|
|
|
|
# This option enables the use of an experimental pure-Go implementation of
|
|
|
|
# the Olm protocol instead of libolm for end-to-end encryption. Using goolm
|
|
|
|
# is not recommended by the mautrix developers, but they are interested in
|
|
|
|
# people trying it out in non-production-critical environments and reporting
|
|
|
|
# any issues they run into.
|
|
|
|
withGoolm ? false,
|
|
|
|
}:
|
2021-04-13 03:37:17 +00:00
|
|
|
|
2024-02-18 18:58:39 +00:00
|
|
|
buildGoModule rec {
|
2021-04-13 03:37:17 +00:00
|
|
|
pname = "mautrix-signal";
|
2024-08-26 18:58:08 +00:00
|
|
|
version = "0.7.0";
|
2021-04-13 03:37:17 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
2021-11-17 12:23:31 +00:00
|
|
|
owner = "mautrix";
|
|
|
|
repo = "signal";
|
2024-02-18 18:58:39 +00:00
|
|
|
rev = "v${version}";
|
2024-08-26 18:58:08 +00:00
|
|
|
hash = "sha256-/JO2SFAG42cyY1JICT/BJQ8VrkNLsEfAoeWwu9Ofl68=";
|
2021-04-13 03:37:17 +00:00
|
|
|
};
|
|
|
|
|
2024-08-28 00:15:47 +00:00
|
|
|
buildInputs = (lib.optional (!withGoolm) olm) ++ [
|
2023-12-31 12:44:49 +00:00
|
|
|
# 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
|
2023-01-31 05:52:58 +00:00
|
|
|
];
|
2024-08-28 00:15:47 +00:00
|
|
|
tags = lib.optional withGoolm "goolm";
|
2023-01-31 05:52:58 +00:00
|
|
|
|
2024-08-26 18:58:08 +00:00
|
|
|
vendorHash = "sha256-MmbpY4VP6vrwGCI74GZ/QslThHDLQmIwI7G63Gru3UI=";
|
2021-04-13 03:37:17 +00:00
|
|
|
|
|
|
|
doCheck = false;
|
|
|
|
|
|
|
|
meta = with lib; {
|
2021-11-17 12:23:31 +00:00
|
|
|
homepage = "https://github.com/mautrix/signal";
|
2021-04-13 03:37:17 +00:00
|
|
|
description = "Matrix-Signal puppeting bridge";
|
|
|
|
license = licenses.agpl3Plus;
|
2024-09-02 18:38:04 +00:00
|
|
|
maintainers = with maintainers; [
|
|
|
|
expipiplus1
|
|
|
|
niklaskorz
|
|
|
|
ma27
|
|
|
|
];
|
2023-11-27 01:17:53 +00:00
|
|
|
mainProgram = "mautrix-signal";
|
2021-04-13 03:37:17 +00:00
|
|
|
};
|
|
|
|
}
|