Commit 2de9476b authored by Anderson Torres's avatar Anderson Torres
Browse files

SDL1: move rpath next to its usage

parent 3108fc27
Loading
Loading
Loading
Loading
+3 −2
Original line number Diff line number Diff line
@@ -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"