From 3db4ce91d04d03f9add52b4e97c07a1666d58d7f Mon Sep 17 00:00:00 2001 From: Orivej Desh Date: Sun, 10 Jun 2018 22:25:33 +0000 Subject: [PATCH] SDL2: do not patchelf libSDL2.so twice There are two symlinks pointing to the same library, libSDL2.so and libSDL2-2.0.so.0. patchelf should run on non-symlinks instead. --- pkgs/development/libraries/SDL2/default.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkgs/development/libraries/SDL2/default.nix b/pkgs/development/libraries/SDL2/default.nix index 01fdc2a087e..990daf19685 100644 --- a/pkgs/development/libraries/SDL2/default.nix +++ b/pkgs/development/libraries/SDL2/default.nix @@ -80,7 +80,7 @@ stdenv.mkDerivation rec { # from above in this way. This is pretty weird. postFixup = optionalString (stdenv.hostPlatform.extensions.sharedLibrary == ".so") '' for lib in $out/lib/*.so* ; do - if [[ -L "$lib" ]]; then + if ! [[ -L "$lib" ]]; then patchelf --set-rpath "$(patchelf --print-rpath $lib):${lib.makeLibraryPath propagatedBuildInputs}" "$lib" fi done