mautrix-signal: fix build with goolm enabled
When building with goolm support, libstdc++ must be linked, as libsignal-ffi depends on it being linked. When building with (deprecated) libolm, it's pulled in transitively, it seems -- and it that case, this is effectively a no-op. Signed-off-by: Christoph Heiss <christoph@c8h4.io>
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
{
|
||||
lib,
|
||||
stdenv,
|
||||
buildGoModule,
|
||||
fetchFromGitHub,
|
||||
fetchpatch,
|
||||
@@ -32,13 +33,19 @@ buildGoModule rec {
|
||||
})
|
||||
];
|
||||
|
||||
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
|
||||
];
|
||||
buildInputs =
|
||||
(lib.optional (!withGoolm) olm)
|
||||
++ (lib.optional withGoolm stdenv.cc.cc.lib)
|
||||
++ [
|
||||
# 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";
|
||||
|
||||
CGO_LDFLAGS = lib.optional withGoolm [ "-lstdc++" ];
|
||||
|
||||
vendorHash = "sha256-bKQKO5RqgMrWq7NyNF1rj2CLp5SeBP80HWxF8MWnZ1U=";
|
||||
|
||||
doCheck = false;
|
||||
|
||||
Reference in New Issue
Block a user