diff --git a/pkgs/development/libraries/qt-6/modules/qtbase.nix b/pkgs/development/libraries/qt-6/modules/qtbase.nix index d539abff5130..ae89c223d2df 100644 --- a/pkgs/development/libraries/qt-6/modules/qtbase.nix +++ b/pkgs/development/libraries/qt-6/modules/qtbase.nix @@ -269,7 +269,7 @@ stdenv.mkDerivation rec { moveToOutput libexec "$dev" # fixup .pc file (where to find 'moc' etc.) - if [ -d "$dev/lib/pkgconfig" ]; then + if [ -f "$dev/lib/pkgconfig/Qt6Core.pc" ]; then sed -i "$dev/lib/pkgconfig/Qt6Core.pc" \ -e "/^bindir=/ c bindir=$dev/bin" fi @@ -277,7 +277,9 @@ stdenv.mkDerivation rec { patchShebangs $out $dev # QTEST_ASSERT and other macros keeps runtime reference to qtbase.dev - substituteInPlace "$dev/include/QtTest/qtestassert.h" --replace "__FILE__" "__BASE_FILE__" + if [ -f "$dev/include/QtTest/qtestassert.h" ]; then + substituteInPlace "$dev/include/QtTest/qtestassert.h" --replace "__FILE__" "__BASE_FILE__" + fi ''; dontStrip = debugSymbols;