mirror of
https://github.com/ilyakooo0/nixpkgs.git
synced 2024-12-26 21:33:03 +03:00
SDL: Do not propagate -dev outputs at runtime
This commit is contained in:
parent
9d35ea756e
commit
315a049f0b
@ -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
|
||||
'';
|
||||
|
Loading…
Reference in New Issue
Block a user