diff --git a/pkgs/servers/x11/xorg/builder.sh b/pkgs/servers/x11/xorg/builder.sh index 7da1da77340d..528042e3df98 100644 --- a/pkgs/servers/x11/xorg/builder.sh +++ b/pkgs/servers/x11/xorg/builder.sh @@ -15,16 +15,26 @@ postInstall() { echo "propagating requisites $requires" for r in $requires; do - for p in $pkgs; do - if test -e $p/lib/pkgconfig/$r.pc; then - echo " found requisite $r in $p" - propagatedBuildInputs="$propagatedBuildInputs $p" - fi - done + if test -n "$crossConfig"; then + for p in $crossPkgs; do + if test -e $p/lib/pkgconfig/$r.pc; then + echo " found requisite $r in $p" + propagatedBuildInputs="$propagatedBuildInputs $p" + fi + done + else + for p in $nativePkgs; do + if test -e $p/lib/pkgconfig/$r.pc; then + echo " found requisite $r in $p" + propagatedBuildNativeInputs="$propagatedBuildNativeInputs $p" + fi + done + fi done ensureDir "$out/nix-support" echo "$propagatedBuildInputs" > "$out/nix-support/propagated-build-inputs" + echo "$propagatedBuildNativeInputs" > "$out/nix-support/propagated-build-native-inputs" } diff --git a/pkgs/stdenv/generic/setup.sh b/pkgs/stdenv/generic/setup.sh index 631182f6b7c3..f8c497f37c29 100644 --- a/pkgs/stdenv/generic/setup.sh +++ b/pkgs/stdenv/generic/setup.sh @@ -170,7 +170,7 @@ findInputs() { if test -f $pkg/nix-support/$propagatedBuildInputsFile; then for i in $(cat $pkg/nix-support/$propagatedBuildInputsFile); do - findInputs $i $var + findInputs $i $var $propagatedBuildInputsFile done fi }