From db6be866d53a65f0081792b05cb37c2a21e5ef89 Mon Sep 17 00:00:00 2001 From: Moritz Sanft <58110325+msanft@users.noreply.github.com> Date: Thu, 5 Dec 2024 14:48:18 +0100 Subject: [PATCH] gossip: supply correct libsdl2 Gossip previously emitted a warning about libsdl2 not working as expected. This is indeed the case. The library bundled with the Rust program seg-faults. So we'll just stick to supplying the correct one from the SDL2 package. This also makes the warning go away. --- pkgs/by-name/go/gossip/package.nix | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/pkgs/by-name/go/gossip/package.nix b/pkgs/by-name/go/gossip/package.nix index 5540497e35c8..6cb81d28de5d 100644 --- a/pkgs/by-name/go/gossip/package.nix +++ b/pkgs/by-name/go/gossip/package.nix @@ -2,6 +2,7 @@ cmake, darwin, fetchFromGitHub, + SDL2, ffmpeg_6, fontconfig, git, @@ -65,6 +66,7 @@ rustPlatform.buildRustPackage rec { buildInputs = [ + SDL2 ffmpeg_6 fontconfig libGL @@ -98,9 +100,13 @@ rustPlatform.buildRustPackage rec { ''; postFixup = lib.optionalString (!stdenv.hostPlatform.isDarwin) '' + # We don't want the bundled libraries. + rm -rf $out/lib + patchelf $out/bin/gossip \ --add-rpath ${ lib.makeLibraryPath [ + SDL2 libGL libxkbcommon wayland