SDL2: limit postFixup to the platforms supported by patchelf
This prevents future rebuilds on Darwin if this Linux-only postFixup changes.
This commit is contained in:
parent
d1994ebd8a
commit
8d5570a041
@ -78,7 +78,7 @@ stdenv.mkDerivation rec {
|
|||||||
# You can grep SDL sources with `grep -rE 'SDL_(NAME|.*_SYM)'` to
|
# You can grep SDL sources with `grep -rE 'SDL_(NAME|.*_SYM)'` to
|
||||||
# confirm that they actually use most of the `propagatedBuildInputs`
|
# confirm that they actually use most of the `propagatedBuildInputs`
|
||||||
# from above in this way. This is pretty weird.
|
# from above in this way. This is pretty weird.
|
||||||
postFixup = ''
|
postFixup = optionalString (stdenv.hostPlatform.extensions.sharedLibrary == ".so") ''
|
||||||
for lib in $out/lib/*.so* ; do
|
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"
|
patchelf --set-rpath "$(patchelf --print-rpath $lib):${lib.makeLibraryPath propagatedBuildInputs}" "$lib"
|
||||||
|
Loading…
x
Reference in New Issue
Block a user