nixpkgs/pkgs/development/libraries/qt-5/5.5/qtbase/nix-profiles-library-paths.patch
2016-04-20 10:01:06 -05:00

21 lines
989 B
Diff

Index: qt-everywhere-opensource-src-5.5.1/qtbase/src/corelib/kernel/qcoreapplication.cpp
===================================================================
--- qt-everywhere-opensource-src-5.5.1.orig/qtbase/src/corelib/kernel/qcoreapplication.cpp
+++ qt-everywhere-opensource-src-5.5.1/qtbase/src/corelib/kernel/qcoreapplication.cpp
@@ -2498,6 +2498,16 @@ QStringList QCoreApplication::libraryPat
}
}
}
+ qunsetenv("QT_PLUGIN_PATH"); // do not propagate to child processes
+
+ // Add library paths derived from NIX_PROFILES.
+ const QByteArrayList profiles = qgetenv("NIX_PROFILES").split(' ');
+ const QString plugindir = QString::fromLatin1("/lib/qt5/plugins");
+ Q_FOREACH (const QByteArray &profile, profiles) {
+ if (!profile.isEmpty()) {
+ app_libpaths->append(QFile::decodeName(profile) + plugindir);
+ }
+ }
}
return *(coreappdata()->app_libpaths);
}