SDL: Do not propagate -dev outputs at runtime

This commit is contained in:
Thomas Tuegel 2019-09-25 10:57:00 -05:00
parent 9d35ea756e
commit 315a049f0b
No known key found for this signature in database
GPG Key ID: 22CBF5249D4B4D59

View File

@ -13,6 +13,16 @@
with stdenv.lib;
let
extraPropagatedBuildInputs = [ ]
++ optionals x11Support [ libXext libICE libXrandr ]
++ optionals openglSupport [ libGL libGLU ]
++ optional alsaSupport alsaLib
++ optional pulseaudioSupport libpulseaudio
++ optional stdenv.isDarwin Cocoa;
rpath = makeLibraryPath extraPropagatedBuildInputs;
in
stdenv.mkDerivation rec {
pname = "SDL";
version = "1.2.15";
@ -31,12 +41,7 @@ stdenv.mkDerivation rec {
nativeBuildInputs = [ pkgconfig ]
++ optional stdenv.isLinux libcap;
propagatedBuildInputs = [ libiconv ]
++ optionals x11Support [ libXext libICE libXrandr ]
++ optionals openglSupport [ libGL libGLU ]
++ optional alsaSupport alsaLib
++ optional pulseaudioSupport libpulseaudio
++ optional stdenv.isDarwin Cocoa;
propagatedBuildInputs = [ libiconv ] ++ extraPropagatedBuildInputs;
buildInputs = [ ]
++ optional (!stdenv.hostPlatform.isMinGW && alsaSupport) audiofile
@ -108,7 +113,7 @@ stdenv.mkDerivation rec {
postFixup = ''
for lib in $out/lib/*.so* ; do
if [[ -L "$lib" ]]; then
patchelf --set-rpath "$(patchelf --print-rpath $lib):${makeLibraryPath propagatedBuildInputs}" "$lib"
patchelf --set-rpath "$(patchelf --print-rpath $lib):${rpath}" "$lib"
fi
done
'';