Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Backport release-24.05] mautrix-{meta,signal,whatsapp}: build with goolm #338805

Merged
merged 1 commit into from
Sep 1, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 8 additions & 1 deletion pkgs/by-name/ma/mautrix-meta/package.nix
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,12 @@
, lib
, nixosTests
, olm
# 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
}:

buildGoModule rec {
Expand All @@ -19,7 +25,8 @@ buildGoModule rec {
hash = "sha256-whBqhdB2FSFfrbtGtq8v3pjXW7QMt+I0baHTXVGPWVg=";
};

buildInputs = [ olm ];
buildInputs = lib.optional (!withGoolm) olm;
tags = lib.optional withGoolm "goolm";

vendorHash = "sha256-rP9wvF6yYW0TdQ+vQV6ZcVMxnCtqz8xRcd9v+4pYYio=";

Expand Down
18 changes: 15 additions & 3 deletions pkgs/servers/mautrix-signal/default.nix
Original file line number Diff line number Diff line change
@@ -1,4 +1,16 @@
{ lib, buildGoModule, fetchFromGitHub, olm, libsignal-ffi }:
{
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,
}:

buildGoModule rec {
pname = "mautrix-signal";
Expand All @@ -11,12 +23,12 @@ buildGoModule rec {
hash = "sha256-KBb/rLYM2ne4VD/bPy/lcXD0avCx3J74e3zDcmg+Dzs=";
};

buildInputs = [
olm
buildInputs = (lib.optional (!withGoolm) 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
];
tags = lib.optional withGoolm "goolm";

vendorHash = "sha256-DDcz4O3RhV6OVI+qC/LkDW/UsE5jOAn5t/gmILxHx1s=";

Expand Down
16 changes: 14 additions & 2 deletions pkgs/servers/mautrix-whatsapp/default.nix
Original file line number Diff line number Diff line change
@@ -1,4 +1,15 @@
{ lib, buildGoModule, fetchFromGitHub, olm }:
{
lib,
buildGoModule,
fetchFromGitHub,
olm,
# 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,
}:

buildGoModule rec {
pname = "mautrix-whatsapp";
Expand All @@ -11,7 +22,8 @@ buildGoModule rec {
hash = "sha256-iVILI6OGndnxIVmgNcIwHA64tkv9V3OTH3YtrCyeYx4=";
};

buildInputs = [ olm ];
buildInputs = lib.optional (!withGoolm) olm;
tags = lib.optional withGoolm "goolm";

vendorHash = "sha256-DpgkSXSLF+U6zIzJ4AF2uTcFWQQYsRgkaUTG9F+bnVk=";

Expand Down
Loading