diff --git a/pkgs/servers/x11/xorg/builder.sh b/pkgs/servers/x11/xorg/builder.sh index 8bde2867e10..0a145cc0a6c 100644 --- a/pkgs/servers/x11/xorg/builder.sh +++ b/pkgs/servers/x11/xorg/builder.sh @@ -4,11 +4,13 @@ source $stdenv/setup # After installation, automatically add all "Requires" fields in the # pkgconfig files (*.pc) to the propagated build inputs. -origPostInstall=$postInstall -postInstall=postInstall -postInstall() { - if test -n "$origPostInstall"; then eval "$origPostInstall"; fi +if test -n "$postInstall"; then + postInstall="$postInstall; autoPropagateBuildInputs" +else + postInstall=autoPropagateBuildInputs +fi +autoPropagateBuildInputs() { local r p requires requires=$(grep "Requires:" $out/lib/pkgconfig/*.pc | \ sed "s/Requires://" | sed "s/,/ /g")