Skip to content

Commit

Permalink
qt6.qtwebengine: don't try to install locales to qtbase translation d…
Browse files Browse the repository at this point in the history
…irectory
  • Loading branch information
K900 committed Aug 6, 2023
1 parent 5bc47ff commit 83bed9b
Show file tree
Hide file tree
Showing 2 changed files with 31 additions and 0 deletions.
3 changes: 3 additions & 0 deletions pkgs/development/libraries/qt-6/modules/qtwebengine.nix
Original file line number Diff line number Diff line change
Expand Up @@ -135,6 +135,9 @@ qtModule {
# environment variable, since NixOS relies on it working.
# See https://github.com/NixOS/nixpkgs/issues/226484 for more context.
../patches/qtwebengine-xkb-includes.patch

# Override locales install path so they go to QtWebEngine's $out
../patches/qtwebengine-locales-path.patch
];

postPatch = ''
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
diff --git a/src/core/api/CMakeLists.txt b/src/core/api/CMakeLists.txt
index f860e0ba7..30e1a767a 100644
--- a/src/core/api/CMakeLists.txt
+++ b/src/core/api/CMakeLists.txt
@@ -193,7 +193,8 @@ if(QT_FEATURE_framework)

else()
install(FILES ${localeFiles}
- DESTINATION ${INSTALL_TRANSLATIONSDIR}/qtwebengine_locales
+ # Nixpkgs: INSTALL_TRANSLATIONSDIR points to Qt base translations store path
+ DESTINATION ${INSTALL_DATADIR}/qtwebengine_locales
CONFIGURATIONS ${config}
)
install(FILES ${resourceFiles}
diff --git a/src/core/web_engine_library_info.cpp b/src/core/web_engine_library_info.cpp
index c03c9a3b2..430fdfab2 100644
--- a/src/core/web_engine_library_info.cpp
+++ b/src/core/web_engine_library_info.cpp
@@ -203,7 +203,8 @@ QString localesPath()
candidatePaths << getResourcesPath(frameworkBundle()) % QDir::separator()
% QLatin1String("qtwebengine_locales");
#endif
- candidatePaths << QLibraryInfo::path(QLibraryInfo::TranslationsPath) % QDir::separator()
+ // Nixpkgs: match the changes made in CMakeLists.txt
+ candidatePaths << QLibraryInfo::path(QLibraryInfo::DataPath) % QDir::separator()
% QLatin1String("qtwebengine_locales");
candidatePaths << fallbackDir();
}

0 comments on commit 83bed9b

Please sign in to comment.