libsignal-ffi: 0.87.1 -> 0.87.5

Since boring v5.0.2, we can set BORING_BSSL_PATH directly to the boringssl package
and BORING_BSSL_INCLUDE_PATH to the include directory of the boringssl-dev package
This commit is contained in:
SchweGELBin
2026-03-12 10:33:59 +01:00
parent 31def4d643
commit 093aaa638a
+8 -15
View File
@@ -3,32 +3,22 @@
stdenv,
fetchFromGitHub,
rustPlatform,
runCommand,
xcodebuild,
protobuf,
boringssl,
}:
let
# boring-sys expects the static libraries in build/ instead of lib/
boringssl-wrapper = runCommand "boringssl-wrapper" { } ''
mkdir $out
cd $out
ln -s ${boringssl.out}/lib build
ln -s ${boringssl.dev}/include include
'';
in
rustPlatform.buildRustPackage (finalAttrs: {
pname = "libsignal-ffi";
# must match the version used in mautrix-signal
# see https://github.com/mautrix/signal/issues/401
version = "0.87.1";
version = "0.87.5";
src = fetchFromGitHub {
fetchSubmodules = true;
owner = "signalapp";
repo = "libsignal";
tag = "v${finalAttrs.version}";
hash = "sha256-yr2+yM7RmUQ7mNDMCcaM5cCpudof14JuO5J6D944k0U=";
hash = "sha256-xffBXvq1ikesIjw6cXfphnTIiyuMiUcY8h0pzSgfD8U=";
};
nativeBuildInputs = [
@@ -37,10 +27,13 @@ rustPlatform.buildRustPackage (finalAttrs: {
]
++ lib.optionals stdenv.hostPlatform.isDarwin [ xcodebuild ];
env.BORING_BSSL_PATH = "${boringssl-wrapper}";
env.NIX_LDFLAGS = if stdenv.hostPlatform.isDarwin then "-lc++" else "-lstdc++";
env = {
BORING_BSSL_INCLUDE_PATH = boringssl.dev + "/include";
BORING_BSSL_PATH = boringssl;
NIX_LDFLAGS = if stdenv.hostPlatform.isDarwin then "-lc++" else "-lstdc++";
};
cargoHash = "sha256-rqxp+RZuuT+nFudNeCgA8g04C9KT1Qi59K4b2avL5u4=";
cargoHash = "sha256-MwAtUrLoSi/pjsBWOAd9JoepAueq17hkZCH21q72O3w=";
cargoBuildFlags = [
"-p"