SDL1: move rpath next to its usage

This commit is contained in:
Anderson Torres 2024-09-04 14:04:03 -03:00
parent 3108fc275f
commit 2de9476bf8

View File

@ -37,7 +37,6 @@ let
++ lib.optional alsaSupport alsa-lib
++ lib.optional pulseaudioSupport libpulseaudio
++ lib.optional stdenv.isDarwin Cocoa;
rpath = lib.makeLibraryPath extraPropagatedBuildInputs;
in
stdenv.mkDerivation rec {
@ -129,7 +128,9 @@ stdenv.mkDerivation rec {
'';
# See the same place in the expression for SDL2
postFixup = ''
postFixup = let
rpath = lib.makeLibraryPath extraPropagatedBuildInputs;
in ''
for lib in $out/lib/*.so* ; do
if [[ -L "$lib" ]]; then
patchelf --set-rpath "$(patchelf --print-rpath $lib):${rpath}" "$lib"