From 8d5570a04163549bc266f58d62d612bd7f7c8b8b Mon Sep 17 00:00:00 2001 From: Orivej Desh Date: Sun, 10 Jun 2018 22:23:33 +0000 Subject: [PATCH] SDL2: limit postFixup to the platforms supported by patchelf This prevents future rebuilds on Darwin if this Linux-only postFixup changes. --- 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 5e01a83b7c0..01fdc2a087e 100644 --- a/pkgs/development/libraries/SDL2/default.nix +++ b/pkgs/development/libraries/SDL2/default.nix @@ -78,7 +78,7 @@ stdenv.mkDerivation rec { # You can grep SDL sources with `grep -rE 'SDL_(NAME|.*_SYM)'` to # confirm that they actually use most of the `propagatedBuildInputs` # from above in this way. This is pretty weird. - postFixup = '' + postFixup = optionalString (stdenv.hostPlatform.extensions.sharedLibrary == ".so") '' for lib in $out/lib/*.so* ; do if [[ -L "$lib" ]]; then patchelf --set-rpath "$(patchelf --print-rpath $lib):${lib.makeLibraryPath propagatedBuildInputs}" "$lib"