diff --git a/pkgs/development/libraries/qt-5/5.5/qtbase/compose-search-path.patch b/pkgs/development/libraries/qt-5/5.5/qtbase/compose-search-path.patch new file mode 100644 index 000000000000..08d12087f080 --- /dev/null +++ b/pkgs/development/libraries/qt-5/5.5/qtbase/compose-search-path.patch @@ -0,0 +1,16 @@ +Index: qt-everywhere-opensource-src-5.5.1/qtbase/src/plugins/platforminputcontexts/compose/generator/qtablegenerator.cpp +=================================================================== +--- qt-everywhere-opensource-src-5.5.1.orig/qtbase/src/plugins/platforminputcontexts/compose/generator/qtablegenerator.cpp ++++ qt-everywhere-opensource-src-5.5.1/qtbase/src/plugins/platforminputcontexts/compose/generator/qtablegenerator.cpp +@@ -68,10 +68,7 @@ void TableGenerator::initPossibleLocatio + // the QTCOMPOSE environment variable + if (qEnvironmentVariableIsSet("QTCOMPOSE")) + m_possibleLocations.append(QString::fromLocal8Bit(qgetenv("QTCOMPOSE"))); +- m_possibleLocations.append(QStringLiteral("/usr/share/X11/locale")); +- m_possibleLocations.append(QStringLiteral("/usr/local/share/X11/locale")); +- m_possibleLocations.append(QStringLiteral("/usr/lib/X11/locale")); +- m_possibleLocations.append(QStringLiteral("/usr/local/lib/X11/locale")); ++ m_possibleLocations.append(QStringLiteral("${libX11}/share/X11/locale")); + m_possibleLocations.append(QStringLiteral(X11_PREFIX "/share/X11/locale")); + m_possibleLocations.append(QStringLiteral(X11_PREFIX "/lib/X11/locale")); + } diff --git a/pkgs/development/libraries/qt-5/5.5/qtbase/default.nix b/pkgs/development/libraries/qt-5/5.5/qtbase/default.nix index a39d9996b1dd..0cb063010460 100644 --- a/pkgs/development/libraries/qt-5/5.5/qtbase/default.nix +++ b/pkgs/development/libraries/qt-5/5.5/qtbase/default.nix @@ -53,9 +53,6 @@ stdenv.mkDerivation { substituteInPlace configure --replace /bin/pwd pwd substituteInPlace qtbase/configure --replace /bin/pwd pwd substituteInPlace qtbase/src/corelib/global/global.pri --replace /bin/ls ${coreutils}/bin/ls - substituteInPlace qtbase/src/plugins/platforminputcontexts/compose/generator/qtablegenerator.cpp \ - --replace /usr/share/X11/locale ${libX11}/share/X11/locale \ - --replace /usr/lib/X11/locale ${libX11}/share/X11/locale sed -e 's@/\(usr\|opt\)/@/var/empty/@g' -i config.tests/*/*.test -i qtbase/mkspecs/*/*.conf sed -i 's/PATHS.*NO_DEFAULT_PATH//' "qtbase/src/corelib/Qt5Config.cmake.in" @@ -77,6 +74,10 @@ stdenv.mkDerivation { substituteInPlace qtbase/src/dbus/qdbus_symbols.cpp \ --replace "@dbus_libs@" "${dbus}" + substituteInPlace \ + qtbase/src/plugins/platforminputcontexts/compose/generator/qtablegenerator.cpp \ + --replace "@libX11@" "${libX11}" + if [[ -n "$gtkStyle" ]]; then substituteInPlace qtbase/src/widgets/styles/qgtk2painter.cpp --replace "@gtk@" "${gtk}" substituteInPlace qtbase/src/widgets/styles/qgtkstyle_p.cpp \ diff --git a/pkgs/development/libraries/qt-5/5.5/qtbase/series b/pkgs/development/libraries/qt-5/5.5/qtbase/series index d4b356a29189..3cfa50e85b70 100644 --- a/pkgs/development/libraries/qt-5/5.5/qtbase/series +++ b/pkgs/development/libraries/qt-5/5.5/qtbase/series @@ -5,3 +5,4 @@ dlopen-openssl.patch dlopen-dbus.patch xdg-config-dirs.patch nix-profiles-library-paths.patch +compose-search-path.patch