diff --git a/pkgs/development/libraries/qt-4/setup-hook.sh b/pkgs/development/libraries/qt-4/setup-hook.sh index 9fff6e9c8ef5..6e0bbfe7f45f 100644 --- a/pkgs/development/libraries/qt-4/setup-hook.sh +++ b/pkgs/development/libraries/qt-4/setup-hook.sh @@ -1,5 +1,10 @@ export QTDIR=@out@ -for d in @out@/include/*; do - export NIX_CFLAGS_COMPILE="$NIX_CFLAGS_COMPILE -I$d" -done +if [ -z "$normalQt" ]; then + # This helps for g++, but not for moc. And no qt4 package should expect + # having all qt4 header files dirs into -I. But the KDE nix expressions want + # this. + for d in @out@/include/*; do + export NIX_CFLAGS_COMPILE="$NIX_CFLAGS_COMPILE -I$d" + done +fi