From 68cc02588d4659c77b9e5bfab7ff848c2b5248ca Mon Sep 17 00:00:00 2001 From: K900 Date: Sat, 29 Jul 2023 13:10:16 +0300 Subject: [PATCH 1/4] qt5: include qttranslations properly Qt loads its own translations from a hardcoded path, and those are used (among other things) for determining RTL layout preferences in applications, so they are definitely something we want to have. This adds a qtbase/qttools rebuild to the chain, but it's fast enough that it's probably fine. Another approach would be to load translation paths from the environment, and inject it in wrapQtAppsHook, but that seems like more complexity for very questionable build time savings. --- pkgs/development/libraries/qt-5/5.15/default.nix | 12 +++++++++++- pkgs/development/libraries/qt-5/modules/qtbase.nix | 3 +++ pkgs/development/libraries/qt-5/modules/qttools.nix | 2 +- .../libraries/qt-5/modules/qttranslations.nix | 3 ++- pkgs/development/libraries/qt-5/qtModule.nix | 2 +- 5 files changed, 18 insertions(+), 4 deletions(-) diff --git a/pkgs/development/libraries/qt-5/5.15/default.nix b/pkgs/development/libraries/qt-5/5.15/default.nix index 5ae5102abeee..ac4614d2aee1 100644 --- a/pkgs/development/libraries/qt-5/5.15/default.nix +++ b/pkgs/development/libraries/qt-5/5.15/default.nix @@ -331,4 +331,14 @@ let } ../hooks/wrap-qt-apps-hook.sh; }; -in makeScopeWithSplicing (generateSplicesForMkScope "qt5") (_: {}) (_: {}) addPackages + baseScope = makeScopeWithSplicing (generateSplicesForMkScope "qt5") (_: {}) (_: {}) addPackages; + + bootstrapScope = baseScope.overrideScope(final: prev: { + qtbase = prev.qtbase.override { qttranslations = null; }; + qtdeclarative = null; + }); + + finalScope = baseScope.overrideScope(final: prev: { + qttranslations = bootstrapScope.qttranslations; + }); +in finalScope diff --git a/pkgs/development/libraries/qt-5/modules/qtbase.nix b/pkgs/development/libraries/qt-5/modules/qtbase.nix index de73bcbe2772..9f0feaf94e58 100644 --- a/pkgs/development/libraries/qt-5/modules/qtbase.nix +++ b/pkgs/development/libraries/qt-5/modules/qtbase.nix @@ -15,6 +15,7 @@ # optional dependencies , cups ? null, postgresql ? null , withGtk3 ? false, dconf, gtk3 +, qttranslations ? null # options , libGLSupported ? !stdenv.isDarwin @@ -310,6 +311,8 @@ stdenv.mkDerivation (finalAttrs: { ] ++ lib.optionals (mysqlSupport) [ "-L" "${libmysqlclient}/lib" "-I" "${libmysqlclient}/include" + ] ++ lib.optional (qttranslations != null) [ + "-translationdir" "${qttranslations}/translations" ] ); diff --git a/pkgs/development/libraries/qt-5/modules/qttools.nix b/pkgs/development/libraries/qt-5/modules/qttools.nix index be96236d7285..bac70d146bf9 100644 --- a/pkgs/development/libraries/qt-5/modules/qttools.nix +++ b/pkgs/development/libraries/qt-5/modules/qttools.nix @@ -36,7 +36,7 @@ qtModule { "bin/macdeployqt" ]; - env.NIX_CFLAGS_COMPILE = lib.optionalString stdenv.isDarwin ''-DNIXPKGS_QMLIMPORTSCANNER="${qtdeclarative.dev}/bin/qmlimportscanner"''; + env.NIX_CFLAGS_COMPILE = lib.optionalString (stdenv.isDarwin && qtdeclarative != null) ''-DNIXPKGS_QMLIMPORTSCANNER="${qtdeclarative.dev}/bin/qmlimportscanner"''; setupHook = ../hooks/qttools-setup-hook.sh; } diff --git a/pkgs/development/libraries/qt-5/modules/qttranslations.nix b/pkgs/development/libraries/qt-5/modules/qttranslations.nix index f49a4eb9a85d..bcd52cdc4a8f 100644 --- a/pkgs/development/libraries/qt-5/modules/qttranslations.nix +++ b/pkgs/development/libraries/qt-5/modules/qttranslations.nix @@ -2,5 +2,6 @@ qtModule { pname = "qttranslations"; - qtInputs = [ qttools ]; + nativeBuildInputs = [ qttools ]; + outputs = [ "out" ]; } diff --git a/pkgs/development/libraries/qt-5/qtModule.nix b/pkgs/development/libraries/qt-5/qtModule.nix index 9abd9fabc957..bddbf254c5f7 100644 --- a/pkgs/development/libraries/qt-5/qtModule.nix +++ b/pkgs/development/libraries/qt-5/qtModule.nix @@ -17,7 +17,7 @@ mkDerivation (args // { patches = (args.patches or []) ++ (patches.${pname} or []); nativeBuildInputs = (args.nativeBuildInputs or []) ++ [ perl self.qmake ]; - propagatedBuildInputs = args.qtInputs ++ (args.propagatedBuildInputs or []); + propagatedBuildInputs = (args.qtInputs or []) ++ (args.propagatedBuildInputs or []); outputs = args.outputs or [ "out" "dev" ]; setOutputFlags = args.setOutputFlags or false; From 0597d865ef4f763f3fed54702b29ce328d28e2b4 Mon Sep 17 00:00:00 2001 From: K900 Date: Sat, 29 Jul 2023 13:52:02 +0300 Subject: [PATCH 2/4] qt6: include qttranslations properly --- pkgs/development/libraries/qt-6/default.nix | 15 ++++++++++++--- .../development/libraries/qt-6/modules/qtbase.nix | 3 ++- .../libraries/qt-6/modules/qttranslations.nix | 3 ++- ...qtbase-allow-translations-outside-prefix.patch | 13 +++++++++++++ pkgs/development/libraries/qt-6/qtModule.nix | 2 +- 5 files changed, 30 insertions(+), 6 deletions(-) create mode 100644 pkgs/development/libraries/qt-6/patches/0008-qtbase-allow-translations-outside-prefix.patch diff --git a/pkgs/development/libraries/qt-6/default.nix b/pkgs/development/libraries/qt-6/default.nix index d9bc6ae15e1f..09bd183cf545 100644 --- a/pkgs/development/libraries/qt-6/default.nix +++ b/pkgs/development/libraries/qt-6/default.nix @@ -48,6 +48,7 @@ let ./patches/0005-qtbase-deal-with-a-font-face-at-index-0-as-Regular-f.patch ./patches/0006-qtbase-qt-cmake-always-use-cmake-from-path.patch ./patches/0007-qtbase-find-qt-tools-in-QTTOOLSPATH.patch + ./patches/0008-qtbase-allow-translations-outside-prefix.patch ]; }; env = callPackage ./qt-env.nix { }; @@ -168,6 +169,14 @@ let # TODO(@Artturin): convert to makeScopeWithSplicing # simple example of how to do that in 5568a4d25ca406809530420996d57e0876ca1a01 - self = lib.makeScope newScope addPackages; -in -self + baseScope = lib.makeScope newScope addPackages; + + bootstrapScope = baseScope.overrideScope'(final: prev: { + qtbase = prev.qtbase.override { qttranslations = null; }; + qtdeclarative = null; + }); + + finalScope = baseScope.overrideScope'(final: prev: { + qttranslations = bootstrapScope.qttranslations; + }); +in finalScope diff --git a/pkgs/development/libraries/qt-6/modules/qtbase.nix b/pkgs/development/libraries/qt-6/modules/qtbase.nix index 4a4ebb320757..c0a20503e64c 100644 --- a/pkgs/development/libraries/qt-6/modules/qtbase.nix +++ b/pkgs/development/libraries/qt-6/modules/qtbase.nix @@ -93,6 +93,7 @@ , libGL , debug ? false , developerBuild ? false +, qttranslations ? null }: let @@ -233,7 +234,7 @@ stdenv.mkDerivation rec { ] ++ lib.optionals stdenv.isDarwin [ # error: 'path' is unavailable: introduced in macOS 10.15 "-DQT_FEATURE_cxx17_filesystem=OFF" - ]; + ] ++ lib.optional (qttranslations != null) "-DINSTALL_TRANSLATIONSDIR=${qttranslations}/translations"; NIX_LDFLAGS = toString (lib.optionals stdenv.isDarwin [ # Undefined symbols for architecture arm64: "___gss_c_nt_hostbased_service_oid_desc" diff --git a/pkgs/development/libraries/qt-6/modules/qttranslations.nix b/pkgs/development/libraries/qt-6/modules/qttranslations.nix index 4795cd9e1bfe..61c642de1085 100644 --- a/pkgs/development/libraries/qt-6/modules/qttranslations.nix +++ b/pkgs/development/libraries/qt-6/modules/qttranslations.nix @@ -4,5 +4,6 @@ qtModule { pname = "qttranslations"; - qtInputs = [ qttools ]; + nativeBuildInputs = [ qttools ]; + outputs = [ "out" ]; } diff --git a/pkgs/development/libraries/qt-6/patches/0008-qtbase-allow-translations-outside-prefix.patch b/pkgs/development/libraries/qt-6/patches/0008-qtbase-allow-translations-outside-prefix.patch new file mode 100644 index 000000000000..e96cbdbef11d --- /dev/null +++ b/pkgs/development/libraries/qt-6/patches/0008-qtbase-allow-translations-outside-prefix.patch @@ -0,0 +1,13 @@ +diff --git a/cmake/QtBuild.cmake b/cmake/QtBuild.cmake +index b45ec1d208..05f69c131b 100644 +--- a/cmake/QtBuild.cmake ++++ b/cmake/QtBuild.cmake +@@ -30,7 +30,7 @@ function(qt_configure_process_path name default docstring) + set(rel_path ".") + elseif(rel_path MATCHES "^\.\./") + # INSTALL_SYSCONFDIR is allowed to be outside the prefix. +- if(NOT name STREQUAL "INSTALL_SYSCONFDIR") ++ if(NOT (name STREQUAL "INSTALL_SYSCONFDIR" OR name STREQUAL "INSTALL_TRANSLATIONSDIR")) + message(FATAL_ERROR + "Path component '${name}' is outside computed install prefix: ${rel_path} ") + return() diff --git a/pkgs/development/libraries/qt-6/qtModule.nix b/pkgs/development/libraries/qt-6/qtModule.nix index 98606d24a968..ce917a274159 100644 --- a/pkgs/development/libraries/qt-6/qtModule.nix +++ b/pkgs/development/libraries/qt-6/qtModule.nix @@ -22,7 +22,7 @@ stdenv.mkDerivation (args // { buildInputs = args.buildInputs or [ ]; nativeBuildInputs = (args.nativeBuildInputs or [ ]) ++ [ cmake ninja perl ] ++ lib.optionals stdenv.isDarwin [ moveBuildTree ]; - propagatedBuildInputs = args.qtInputs ++ (args.propagatedBuildInputs or [ ]); + propagatedBuildInputs = (args.qtInputs or [ ]) ++ (args.propagatedBuildInputs or [ ]); moveToDev = false; From 4d0a76416f5ca0402bfe7fc3fcd52a6d36c660c3 Mon Sep 17 00:00:00 2001 From: K900 Date: Sat, 29 Jul 2023 17:21:34 +0300 Subject: [PATCH 3/4] qt6.qtwebengine: don't try to install locales to qtbase translation directory --- .../libraries/qt-6/modules/qtwebengine.nix | 3 ++ .../patches/qtwebengine-locales-path.patch | 28 +++++++++++++++++++ 2 files changed, 31 insertions(+) create mode 100644 pkgs/development/libraries/qt-6/patches/qtwebengine-locales-path.patch diff --git a/pkgs/development/libraries/qt-6/modules/qtwebengine.nix b/pkgs/development/libraries/qt-6/modules/qtwebengine.nix index 909616d953de..361be9490b64 100644 --- a/pkgs/development/libraries/qt-6/modules/qtwebengine.nix +++ b/pkgs/development/libraries/qt-6/modules/qtwebengine.nix @@ -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 = '' diff --git a/pkgs/development/libraries/qt-6/patches/qtwebengine-locales-path.patch b/pkgs/development/libraries/qt-6/patches/qtwebengine-locales-path.patch new file mode 100644 index 000000000000..58f2d96f8097 --- /dev/null +++ b/pkgs/development/libraries/qt-6/patches/qtwebengine-locales-path.patch @@ -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(); + } From 6edd6f71c7a089e88e500243904ea76ef023930c Mon Sep 17 00:00:00 2001 From: K900 Date: Sat, 29 Jul 2023 13:57:50 +0300 Subject: [PATCH 4/4] treewide: clean up all qttranslations workarounds There are two kinds of changes here: - removing explicit qttranslations path hardcoding from applications that were patched to do it - replacing qttranslations in buildInputs with qttools for packages that really depend on the latter After this, qttranslation is never used outside Qt itself, as it should. --- .../editors/molsketch/default.nix | 5 +- pkgs/applications/emulators/pcsx2/default.nix | 2 - .../gis/openorienteering-mapper/default.nix | 7 -- .../fix-qttranslations-path.diff | 13 ---- pkgs/applications/gis/qmapshack/default.nix | 12 +-- .../qmapshack/fix-qttranslations-path.patch | 74 ------------------- pkgs/applications/misc/birdtray/default.nix | 11 --- .../birdtray/fix-qttranslations-path.diff | 13 ---- .../misc/crow-translate/default.nix | 10 --- .../fix-qttranslations-path.patch | 13 ---- pkgs/applications/misc/edgetx/default.nix | 7 +- pkgs/applications/misc/gpsbabel/default.nix | 7 +- pkgs/applications/misc/gpxlab/default.nix | 10 +-- .../misc/gpxlab/fix-qttranslations-path.patch | 17 ----- pkgs/applications/misc/gpxsee/default.nix | 8 -- .../misc/gpxsee/fix-qttranslations-path.diff | 18 ----- pkgs/applications/misc/merkaartor/default.nix | 2 - pkgs/applications/misc/opentx/default.nix | 7 +- pkgs/applications/misc/ubpm/default.nix | 5 +- pkgs/applications/misc/valentina/default.nix | 10 +-- .../valentina/fix-qttranslations-path.patch | 37 ---------- .../instant-messengers/linphone/default.nix | 4 +- .../instant-messengers/qtox/default.nix | 2 - .../mailreaders/trojita/default.nix | 8 -- .../trojita/fix-qttranslations-path.patch | 13 ---- pkgs/applications/office/PageEdit/default.nix | 4 +- .../science/astronomy/stellarium/default.nix | 4 +- pkgs/development/libraries/kdb/default.nix | 6 +- .../libraries/kde-frameworks/kirigami2.nix | 6 +- pkgs/games/qgo/default.nix | 6 +- pkgs/tools/misc/ksnip/default.nix | 4 +- pkgs/tools/security/nitrokey-app/default.nix | 4 +- pkgs/tools/security/qdigidoc/default.nix | 5 +- pkgs/tools/security/web-eid-app/default.nix | 4 +- 34 files changed, 40 insertions(+), 318 deletions(-) delete mode 100644 pkgs/applications/gis/openorienteering-mapper/fix-qttranslations-path.diff delete mode 100644 pkgs/applications/gis/qmapshack/fix-qttranslations-path.patch delete mode 100644 pkgs/applications/misc/birdtray/fix-qttranslations-path.diff delete mode 100644 pkgs/applications/misc/crow-translate/fix-qttranslations-path.patch delete mode 100644 pkgs/applications/misc/gpxlab/fix-qttranslations-path.patch delete mode 100644 pkgs/applications/misc/gpxsee/fix-qttranslations-path.diff delete mode 100644 pkgs/applications/misc/valentina/fix-qttranslations-path.patch delete mode 100644 pkgs/applications/networking/mailreaders/trojita/fix-qttranslations-path.patch diff --git a/pkgs/applications/editors/molsketch/default.nix b/pkgs/applications/editors/molsketch/default.nix index d688a50f28d3..55db4096ce15 100644 --- a/pkgs/applications/editors/molsketch/default.nix +++ b/pkgs/applications/editors/molsketch/default.nix @@ -3,11 +3,11 @@ , fetchurl , cmake , pkg-config +, qttools , wrapQtAppsHook , hicolor-icon-theme , openbabel , desktop-file-utils -, qttranslations }: mkDerivation rec { @@ -37,12 +37,11 @@ mkDerivation rec { mv $out/lib/molsketch/* $out/lib ''; - nativeBuildInputs = [ cmake pkg-config wrapQtAppsHook ]; + nativeBuildInputs = [ cmake pkg-config qttools wrapQtAppsHook ]; buildInputs = [ hicolor-icon-theme openbabel desktop-file-utils - qttranslations ]; meta = with lib; { diff --git a/pkgs/applications/emulators/pcsx2/default.nix b/pkgs/applications/emulators/pcsx2/default.nix index fea7bf17ef7b..1b016e0559dd 100644 --- a/pkgs/applications/emulators/pcsx2/default.nix +++ b/pkgs/applications/emulators/pcsx2/default.nix @@ -18,7 +18,6 @@ , qtbase , qtsvg , qttools -, qttranslations , qtwayland , rapidyaml , SDL2 @@ -83,7 +82,6 @@ llvmPackages_16.stdenv.mkDerivation rec { qtbase qtsvg qttools - qttranslations qtwayland rapidyaml SDL2 diff --git a/pkgs/applications/gis/openorienteering-mapper/default.nix b/pkgs/applications/gis/openorienteering-mapper/default.nix index b73fb71f698f..9722c3cb4dee 100644 --- a/pkgs/applications/gis/openorienteering-mapper/default.nix +++ b/pkgs/applications/gis/openorienteering-mapper/default.nix @@ -14,8 +14,6 @@ , qtlocation , qtsensors , qttools -, qttranslations -, substituteAll , zlib }: @@ -31,11 +29,6 @@ mkDerivation rec { }; patches = [ - # https://github.com/NixOS/nixpkgs/issues/86054 - (substituteAll { - src = ./fix-qttranslations-path.diff; - inherit qttranslations; - }) # https://github.com/OpenOrienteering/mapper/pull/1907 (fetchpatch { url = "https://github.com/OpenOrienteering/mapper/commit/bc52aa567e90a58d6963b44d5ae1909f3f841508.patch"; diff --git a/pkgs/applications/gis/openorienteering-mapper/fix-qttranslations-path.diff b/pkgs/applications/gis/openorienteering-mapper/fix-qttranslations-path.diff deleted file mode 100644 index 06c465a8fb33..000000000000 --- a/pkgs/applications/gis/openorienteering-mapper/fix-qttranslations-path.diff +++ /dev/null @@ -1,13 +0,0 @@ -diff --git i/src/util/translation_util.cpp w/src/util/translation_util.cpp -index da03d216..c1f12751 100644 ---- i/src/util/translation_util.cpp -+++ w/src/util/translation_util.cpp -@@ -103,7 +103,7 @@ TranslationUtil::TranslationUtil(const QString& code, QString translation_file) - } - - QString translation_name = QLatin1String("qt_") + language.code; -- if (!qt_translator.load(translation_name, QLibraryInfo::location(QLibraryInfo::TranslationsPath))) -+ if (!qt_translator.load(translation_name, QLatin1String("@qttranslations@/translations"))) - load(qt_translator, translation_name); - - load(app_translator, translation_file); diff --git a/pkgs/applications/gis/qmapshack/default.nix b/pkgs/applications/gis/qmapshack/default.nix index 2665e74ed395..3460f60d2b63 100644 --- a/pkgs/applications/gis/qmapshack/default.nix +++ b/pkgs/applications/gis/qmapshack/default.nix @@ -1,5 +1,5 @@ -{ lib, stdenv, fetchFromGitHub, cmake, substituteAll, wrapQtAppsHook -, qtscript, qttranslations, qtwebengine, gdal, proj, routino, quazip }: +{ lib, stdenv, fetchFromGitHub, cmake, wrapQtAppsHook +, qtscript, qtwebengine, gdal, proj, routino, quazip }: stdenv.mkDerivation rec { pname = "qmapshack"; @@ -12,14 +12,6 @@ stdenv.mkDerivation rec { hash = "sha256-qG/fiR2J5wQZaR+xvBGjdp3L7viqki2ktkzBUf6fZi8="; }; - patches = [ - # See https://github.com/NixOS/nixpkgs/issues/86054 - (substituteAll { - src = ./fix-qttranslations-path.patch; - inherit qttranslations; - }) - ]; - nativeBuildInputs = [ cmake wrapQtAppsHook ]; buildInputs = [ qtscript qtwebengine gdal proj routino quazip ]; diff --git a/pkgs/applications/gis/qmapshack/fix-qttranslations-path.patch b/pkgs/applications/gis/qmapshack/fix-qttranslations-path.patch deleted file mode 100644 index 9f05611f5a28..000000000000 --- a/pkgs/applications/gis/qmapshack/fix-qttranslations-path.patch +++ /dev/null @@ -1,74 +0,0 @@ -diff --git i/src/qmapshack/setup/CAppSetupLinux.cpp w/src/qmapshack/setup/CAppSetupLinux.cpp -index 7581ef32..26eba3c8 100644 ---- i/src/qmapshack/setup/CAppSetupLinux.cpp -+++ w/src/qmapshack/setup/CAppSetupLinux.cpp -@@ -30,7 +30,7 @@ void CAppSetupLinux::initQMapShack() { - prepareGdal("", ""); - - // setup translators -- QString resourceDir = QLibraryInfo::location(QLibraryInfo::TranslationsPath); -+ QLatin1String resourceDir = QLatin1String("@qttranslations@/translations"); - QString translationPath = QCoreApplication::applicationDirPath(); - translationPath.replace(QRegExp("bin$"), "share/qmapshack/translations"); - prepareTranslator(resourceDir, "qt_"); -diff --git i/src/qmapshack/setup/CAppSetupMac.cpp w/src/qmapshack/setup/CAppSetupMac.cpp -index 37602802..ae4a5a23 100644 ---- i/src/qmapshack/setup/CAppSetupMac.cpp -+++ w/src/qmapshack/setup/CAppSetupMac.cpp -@@ -56,7 +56,7 @@ void CAppSetupMac::initQMapShack() { - - // setup translators - QString translationPath = getApplicationDir(relTranslationDir).absolutePath(); -- prepareTranslator(translationPath, "qt_"); -+ prepareTranslator(QLatin1String("@qttranslations@/translations"), "qt_"); - prepareTranslator(translationPath, "qmapshack_"); - - // load and apply style sheet -diff --git i/src/qmaptool/setup/CAppSetupLinux.cpp w/src/qmaptool/setup/CAppSetupLinux.cpp -index b703e7bb..637d653e 100644 ---- i/src/qmaptool/setup/CAppSetupLinux.cpp -+++ w/src/qmaptool/setup/CAppSetupLinux.cpp -@@ -29,7 +29,7 @@ void CAppSetupLinux::initQMapTool() { - prepareGdal("", ""); - - // setup translators -- QString resourceDir = QLibraryInfo::location(QLibraryInfo::TranslationsPath); -+ QLatin1String resourceDir = QLatin1String("@qttranslations@/translations"); - QString translationPath = QCoreApplication::applicationDirPath(); - translationPath.replace(QRegExp("bin$"), "share/qmaptool/translations"); - prepareTranslator(resourceDir, "qt_"); -diff --git i/src/qmaptool/setup/CAppSetupMac.cpp w/src/qmaptool/setup/CAppSetupMac.cpp -index dd68b9c1..84351cf4 100644 ---- i/src/qmaptool/setup/CAppSetupMac.cpp -+++ w/src/qmaptool/setup/CAppSetupMac.cpp -@@ -57,7 +57,7 @@ void CAppSetupMac::initQMapTool() { - - // setup translators - QString translationPath = getApplicationDir(relTranslationDir).absolutePath(); -- prepareTranslator(translationPath, "qt_"); -+ prepareTranslator(QLatin1String("@qttranslations@/translations"), "qt_"); - prepareTranslator(translationPath, "qmaptool_"); - - migrateDirContent(defaultCachePath()); -diff --git i/src/qmt_rgb2pct/main.cpp w/src/qmt_rgb2pct/main.cpp -index 589d3d52..5f7c12f8 100644 ---- i/src/qmt_rgb2pct/main.cpp -+++ w/src/qmt_rgb2pct/main.cpp -@@ -47,7 +47,7 @@ static void prepareTranslator(QString translationPath, QString translationPrefix - static void loadTranslations() { - #if defined(Q_OS_LINUX) || defined(Q_OS_FREEBSD) || defined(__FreeBSD_kernel__) || defined(__GNU__) || \ - defined(Q_OS_CYGWIN) -- QString resourceDir = QLibraryInfo::location(QLibraryInfo::TranslationsPath); -+ QLatin1String resourceDir = QLatin1String("@qttranslations@/translations"); - QString translationPath = QCoreApplication::applicationDirPath(); - translationPath.replace(QRegExp("bin$"), "share/" APP_STR "/translations"); - prepareTranslator(resourceDir, "qt_"); -@@ -58,7 +58,7 @@ static void loadTranslations() { - // os x - static QString relTranslationDir = "Resources/translations"; // app - QString translationPath = getApplicationDir(relTranslationDir).absolutePath(); -- prepareTranslator(translationPath, "qt_"); -+ prepareTranslator(QLatin1String("@qttranslations@/translations"), "qt_"); - prepareTranslator(translationPath, APP_STR "_"); - #endif - diff --git a/pkgs/applications/misc/birdtray/default.nix b/pkgs/applications/misc/birdtray/default.nix index f007fb71377b..5ab42d36b3a0 100644 --- a/pkgs/applications/misc/birdtray/default.nix +++ b/pkgs/applications/misc/birdtray/default.nix @@ -7,7 +7,6 @@ , qtbase , qttools , qtx11extras - , qttranslations }: mkDerivation rec { @@ -21,21 +20,11 @@ mkDerivation rec { sha256 = "1469ng6zk0qx0qfsihrnlz1j9i1wk0hx4vqdaplz9mdpyxvmlryk"; }; - patches = [ - # See https://github.com/NixOS/nixpkgs/issues/86054 - ./fix-qttranslations-path.diff - ]; - nativeBuildInputs = [ cmake pkg-config ]; buildInputs = [ qtbase qttools qtx11extras ]; - postPatch = '' - substituteInPlace src/birdtrayapp.cpp \ - --subst-var-by qttranslations ${qttranslations} - ''; - # Wayland support is broken. # https://github.com/gyunaev/birdtray/issues/113#issuecomment-621742315 qtWrapperArgs = [ "--set QT_QPA_PLATFORM xcb" ]; diff --git a/pkgs/applications/misc/birdtray/fix-qttranslations-path.diff b/pkgs/applications/misc/birdtray/fix-qttranslations-path.diff deleted file mode 100644 index 2a379b5e2744..000000000000 --- a/pkgs/applications/misc/birdtray/fix-qttranslations-path.diff +++ /dev/null @@ -1,13 +0,0 @@ -diff --git a/src/birdtrayapp.cpp b/src/birdtrayapp.cpp -index 847b4d3..3a3709a 100644 ---- a/src/birdtrayapp.cpp -+++ b/src/birdtrayapp.cpp -@@ -130,7 +130,7 @@ bool BirdtrayApp::loadTranslations() { - [](QString path) { return path.append("/translations"); }); - QLocale locale = QLocale::system(); - bool success = loadTranslation( -- qtTranslator, locale, "qt", {QLibraryInfo::location(QLibraryInfo::TranslationsPath)}); -+ qtTranslator, locale, "qt", {QLatin1String("@qttranslations@/translations")}); - success &= loadTranslation(dynamicTranslator, locale, "dynamic", locations); - success &= loadTranslation(mainTranslator, locale, "main", locations); - return success; diff --git a/pkgs/applications/misc/crow-translate/default.nix b/pkgs/applications/misc/crow-translate/default.nix index 77611e2da43c..9c207dcd77c7 100644 --- a/pkgs/applications/misc/crow-translate/default.nix +++ b/pkgs/applications/misc/crow-translate/default.nix @@ -1,7 +1,6 @@ { lib , stdenv , fetchzip -, substituteAll , cmake , extra-cmake-modules , qttools @@ -10,7 +9,6 @@ , tesseract4 , qtmultimedia , qtx11extras -, qttranslations , wrapQtAppsHook , gst_all_1 , testers @@ -26,14 +24,6 @@ stdenv.mkDerivation rec { hash = "sha256-PvfruCqmTBFLWLeIL9NV6+H2AifXcY97ImHzD1zEs28="; }; - patches = [ - (substituteAll { - # See https://github.com/NixOS/nixpkgs/issues/86054 - src = ./fix-qttranslations-path.patch; - inherit qttranslations; - }) - ]; - postPatch = '' substituteInPlace data/io.crow_translate.CrowTranslate.desktop \ --replace "Exec=qdbus" "Exec=${lib.getBin qttools}/bin/qdbus" diff --git a/pkgs/applications/misc/crow-translate/fix-qttranslations-path.patch b/pkgs/applications/misc/crow-translate/fix-qttranslations-path.patch deleted file mode 100644 index 65cfbdf1acf2..000000000000 --- a/pkgs/applications/misc/crow-translate/fix-qttranslations-path.patch +++ /dev/null @@ -1,13 +0,0 @@ -diff --git i/src/settings/appsettings.cpp w/src/settings/appsettings.cpp -index 32cabfb..aab92ea 100644 ---- i/src/settings/appsettings.cpp -+++ w/src/settings/appsettings.cpp -@@ -79,7 +79,7 @@ void AppSettings::applyLocale(const QLocale &locale) - const QLocale newLocale = locale == defaultLocale() ? QLocale::system() : locale; - QLocale::setDefault(newLocale); - s_appTranslator.load(newLocale, QStringLiteral(PROJECT_NAME), QStringLiteral("_"), QStandardPaths::locate(QStandardPaths::AppDataLocation, i18nDir, QStandardPaths::LocateDirectory)); -- s_qtTranslator.load(newLocale, QStringLiteral("qt"), QStringLiteral("_"), QLibraryInfo::location(QLibraryInfo::TranslationsPath)); -+ s_qtTranslator.load(newLocale, QStringLiteral("qt"), QStringLiteral("_"), QLatin1String("@qttranslations@/translations")); - } - - QLocale AppSettings::defaultLocale() diff --git a/pkgs/applications/misc/edgetx/default.nix b/pkgs/applications/misc/edgetx/default.nix index 785ad0ba229a..9e7cf60af1a1 100644 --- a/pkgs/applications/misc/edgetx/default.nix +++ b/pkgs/applications/misc/edgetx/default.nix @@ -1,6 +1,6 @@ { lib, mkDerivation, fetchFromGitHub , cmake, gcc-arm-embedded, python3Packages -, qtbase, qtmultimedia, qttranslations, SDL, gtest +, qtbase, qtmultimedia, qttools, SDL, gtest , dfu-util }: @@ -16,9 +16,9 @@ mkDerivation rec { sha256 = "sha256-bKMAyONy1Udd+2nDVEMrtIsnfqrNuBVMWU7nCqvZ+3E="; }; - nativeBuildInputs = [ cmake gcc-arm-embedded python3Packages.pillow ]; + nativeBuildInputs = [ cmake gcc-arm-embedded python3Packages.pillow qttools ]; - buildInputs = [ qtbase qtmultimedia qttranslations SDL ]; + buildInputs = [ qtbase qtmultimedia SDL ]; postPatch = '' sed -i companion/src/burnconfigdialog.cpp \ @@ -27,7 +27,6 @@ mkDerivation rec { cmakeFlags = [ "-DGTEST_ROOT=${gtest.src}/googletest" - "-DQT_TRANSLATIONS_DIR=${qttranslations}/translations" "-DDFU_UTIL_PATH=${dfu-util}/bin/dfu-util" # file RPATH_CHANGE could not write new RPATH "-DCMAKE_SKIP_BUILD_RPATH=ON" diff --git a/pkgs/applications/misc/gpsbabel/default.nix b/pkgs/applications/misc/gpsbabel/default.nix index 60a1e40a614e..0898c3ccee9a 100644 --- a/pkgs/applications/misc/gpsbabel/default.nix +++ b/pkgs/applications/misc/gpsbabel/default.nix @@ -1,5 +1,5 @@ { lib, stdenv, fetchFromGitHub, fetchurl, pkg-config, which -, qtbase, qmake, qttools, qttranslations, wrapQtAppsHook +, qmake, qttools, wrapQtAppsHook , libusb1, shapelib, zlib , withGUI ? false, qtserialport , withMapPreview ? (!stdenv.isDarwin), qtwebengine @@ -21,11 +21,6 @@ stdenv.mkDerivation rec { postPatch = '' patchShebangs testo - '' + lib.optionalString withGUI '' - # See https://github.com/NixOS/nixpkgs/issues/86054 - substituteInPlace gui/mainwindow.cc \ - --replace 'QLibraryInfo::location(QLibraryInfo::TranslationsPath)' \ - 'QLatin1String("${qttranslations}/translations")' '' + lib.optionalString withDoc '' substituteInPlace gbversion.h.qmake.in \ --replace /usr/share/doc $doc/share/doc diff --git a/pkgs/applications/misc/gpxlab/default.nix b/pkgs/applications/misc/gpxlab/default.nix index 8d2b95ea4f31..9d3d7c27ec8c 100644 --- a/pkgs/applications/misc/gpxlab/default.nix +++ b/pkgs/applications/misc/gpxlab/default.nix @@ -1,5 +1,5 @@ -{ stdenv, mkDerivation, lib, fetchFromGitHub, substituteAll -, qmake, qttools, qttranslations +{ stdenv, mkDerivation, lib, fetchFromGitHub +, qmake, qttools }: mkDerivation rec { @@ -13,12 +13,6 @@ mkDerivation rec { sha256 = "080vnwcciqblfrbfyz9gjhl2lqw1hkdpbgr5qfrlyglkd4ynjd84"; }; - patches = (substituteAll { - # See https://github.com/NixOS/nixpkgs/issues/86054 - src = ./fix-qttranslations-path.patch; - inherit qttranslations; - }); - nativeBuildInputs = [ qmake qttools ]; preConfigure = '' diff --git a/pkgs/applications/misc/gpxlab/fix-qttranslations-path.patch b/pkgs/applications/misc/gpxlab/fix-qttranslations-path.patch deleted file mode 100644 index 8dcba75d764f..000000000000 --- a/pkgs/applications/misc/gpxlab/fix-qttranslations-path.patch +++ /dev/null @@ -1,17 +0,0 @@ -diff --git i/GPXLab/main.cpp w/GPXLab/main.cpp -index b12d2dd..58d37c5 100644 ---- i/GPXLab/main.cpp -+++ w/GPXLab/main.cpp -@@ -19,10 +19,10 @@ int main(int argc, char *argv[]) - app.installTranslator(&gpxlab); - - QTranslator qt; --#if defined(Q_OS_WIN32) || defined(Q_OS_MAC) -+#if defined(Q_OS_WIN32) - qt.load(QLocale::system(), "qt", "_", TRANSLATIONS_DIR); - #else -- qt.load(QLocale::system(), "qt", "_", QLibraryInfo::location(QLibraryInfo::TranslationsPath)); -+ qt.load(QLocale::system(), "qt", "_", QLatin1String("@qttranslations@/translations")); - #endif - app.installTranslator(&qt); - diff --git a/pkgs/applications/misc/gpxsee/default.nix b/pkgs/applications/misc/gpxsee/default.nix index 694323df82d9..c08deed34db0 100644 --- a/pkgs/applications/misc/gpxsee/default.nix +++ b/pkgs/applications/misc/gpxsee/default.nix @@ -3,10 +3,8 @@ , fetchFromGitHub , qmake , nix-update-script -, substituteAll , qtbase , qttools -, qttranslations , qtlocation ? null # qt5 only , qtpositioning ? null # qt6 only , qtpbfimageplugin @@ -31,12 +29,6 @@ stdenv.mkDerivation rec { hash = "sha256-Zf2eyDx5QK69W6HNz/IGGHkX2qCDnxYsU8KLCgU9teY="; }; - patches = (substituteAll { - # See https://github.com/NixOS/nixpkgs/issues/86054 - src = ./fix-qttranslations-path.diff; - inherit qttranslations; - }); - buildInputs = [ qtpbfimageplugin qtserialport ] ++ (if isQt6 then [ qtbase diff --git a/pkgs/applications/misc/gpxsee/fix-qttranslations-path.diff b/pkgs/applications/misc/gpxsee/fix-qttranslations-path.diff deleted file mode 100644 index 757d9b8c6571..000000000000 --- a/pkgs/applications/misc/gpxsee/fix-qttranslations-path.diff +++ /dev/null @@ -1,18 +0,0 @@ -diff --git i/src/GUI/app.cpp w/src/GUI/app.cpp -index 37e9d3f..d4a065c 100644 ---- i/src/GUI/app.cpp -+++ w/src/GUI/app.cpp -@@ -35,11 +35,10 @@ App::App(int &argc, char **argv) : QApplication(argc, argv) - installTranslator(gpxsee); - - QTranslator *qt = new QTranslator(this); --#if defined(Q_OS_WIN32) || defined(Q_OS_MAC) -+#if defined(Q_OS_WIN32) - if (qt->load(QLocale::system(), "qt", "_", ProgramPaths::translationsDir())) - #else // Q_OS_WIN32 || Q_OS_MAC -- if (qt->load(QLocale::system(), "qt", "_", QLibraryInfo::location( -- QLibraryInfo::TranslationsPath))) -+ if (qt->load(QLocale::system(), "qt", "_", QLatin1String("@qttranslations@/translations"))) - #endif // Q_OS_WIN32 || Q_OS_MAC - installTranslator(qt); - diff --git a/pkgs/applications/misc/merkaartor/default.nix b/pkgs/applications/misc/merkaartor/default.nix index c8ac515571c7..9d474ca91f04 100644 --- a/pkgs/applications/misc/merkaartor/default.nix +++ b/pkgs/applications/misc/merkaartor/default.nix @@ -5,7 +5,6 @@ , qmake , qttools , wrapQtAppsHook -, qttranslations , gdal , proj , qtsvg @@ -48,7 +47,6 @@ stdenv.mkDerivation rec { ''; qmakeFlags = [ - "TRANSDIR_SYSTEM=${qttranslations}/translations" "USEWEBENGINE=1" ] ++ lib.optional withGeoimage "GEOIMAGE=1" ++ lib.optional withGpsdlib "GPSDLIB=1" diff --git a/pkgs/applications/misc/opentx/default.nix b/pkgs/applications/misc/opentx/default.nix index e9a526a1f65f..0634c03e7bd7 100644 --- a/pkgs/applications/misc/opentx/default.nix +++ b/pkgs/applications/misc/opentx/default.nix @@ -1,6 +1,6 @@ { lib, mkDerivation, fetchFromGitHub , cmake, gcc-arm-embedded, python3Packages -, qtbase, qtmultimedia, qttranslations, SDL, gtest +, qtbase, qtmultimedia, qttools, SDL, gtest , dfu-util, avrdude }: @@ -15,9 +15,9 @@ mkDerivation rec { sha256 = "sha256-F3zykJhKuIpLQSTjn7mcdjEmgRAlwCZpkTaKQR9ve3g="; }; - nativeBuildInputs = [ cmake gcc-arm-embedded python3Packages.pillow ]; + nativeBuildInputs = [ cmake gcc-arm-embedded python3Packages.pillow qttools ]; - buildInputs = [ qtbase qtmultimedia qttranslations SDL ]; + buildInputs = [ qtbase qtmultimedia SDL ]; postPatch = '' sed -i companion/src/burnconfigdialog.cpp \ @@ -27,7 +27,6 @@ mkDerivation rec { cmakeFlags = [ "-DGTEST_ROOT=${gtest.src}/googletest" - "-DQT_TRANSLATIONS_DIR=${qttranslations}/translations" # XXX I would prefer to include these here, though we will need to file a bug upstream to get that changed. #"-DDFU_UTIL_PATH=${dfu-util}/bin/dfu-util" #"-DAVRDUDE_PATH=${avrdude}/bin/avrdude" diff --git a/pkgs/applications/misc/ubpm/default.nix b/pkgs/applications/misc/ubpm/default.nix index a9053374c7af..6e0d7f7f25f5 100644 --- a/pkgs/applications/misc/ubpm/default.nix +++ b/pkgs/applications/misc/ubpm/default.nix @@ -1,5 +1,5 @@ { stdenv, lib, fetchFromGitea, qmake, qttools, qtbase, qtserialport -, qtconnectivity, qtcharts, qttranslations, wrapQtAppsHook }: +, qtconnectivity, qtcharts, wrapQtAppsHook }: stdenv.mkDerivation (finalAttrs: { pname = "ubpm"; @@ -15,7 +15,6 @@ stdenv.mkDerivation (finalAttrs: { postPatch = '' substituteInPlace sources/mainapp/mainapp.pro \ - --replace '$$[QT_INSTALL_TRANSLATIONS]' '${qttranslations}/translations' \ --replace 'INSTALLDIR = /tmp/ubpm.AppDir' "INSTALLDIR = $out" \ --replace '/usr/bin' '/bin' \ --replace 'INSTALLS += target translations themes devices help lin' 'INSTALLS += target translations themes devices help' @@ -40,7 +39,7 @@ stdenv.mkDerivation (finalAttrs: { # *.so plugins are being wrapped automatically which breaks them dontWrapQtApps = true; - buildInputs = [ qtbase qtserialport qtconnectivity qtcharts qttranslations ]; + buildInputs = [ qtbase qtserialport qtconnectivity qtcharts ]; meta = with lib; { homepage = "https://codeberg.org/LazyT/ubpm"; diff --git a/pkgs/applications/misc/valentina/default.nix b/pkgs/applications/misc/valentina/default.nix index f5cd55c534c3..c00159c0c64d 100644 --- a/pkgs/applications/misc/valentina/default.nix +++ b/pkgs/applications/misc/valentina/default.nix @@ -1,6 +1,6 @@ -{ lib, stdenv, fetchFromGitLab, substituteAll, installShellFiles +{ lib, stdenv, fetchFromGitLab, installShellFiles , qmake, qttools -, qtsvg, qttranslations, qtxmlpatterns +, qtsvg, qtxmlpatterns , wrapQtAppsHook }: @@ -15,12 +15,6 @@ stdenv.mkDerivation rec { hash = "sha256-N9fC2tCP4TVNncatHaz5W5Mp3jOmAcEWYCl30+0myaE="; }; - patches = (substituteAll { - # See https://github.com/NixOS/nixpkgs/issues/86054 - src = ./fix-qttranslations-path.patch; - inherit qttranslations; - }); - postPatch = '' substituteInPlace src/app/translations.pri \ --replace '$$[QT_INSTALL_BINS]/$$LRELEASE' '${lib.getDev qttools}/bin/lrelease' diff --git a/pkgs/applications/misc/valentina/fix-qttranslations-path.patch b/pkgs/applications/misc/valentina/fix-qttranslations-path.patch deleted file mode 100644 index de3fe05cc8b0..000000000000 --- a/pkgs/applications/misc/valentina/fix-qttranslations-path.patch +++ /dev/null @@ -1,37 +0,0 @@ -diff --git i/src/libs/vmisc/vabstractapplication.cpp w/src/libs/vmisc/vabstractapplication.cpp -index b64817bab..5f9aa3518 100644 ---- i/src/libs/vmisc/vabstractapplication.cpp -+++ w/src/libs/vmisc/vabstractapplication.cpp -@@ -221,26 +221,26 @@ void VAbstractApplication::LoadTranslation(const QString &locale) - ClearTranslation(); - - qtTranslator = new QTranslator(this); --#if defined(Q_OS_WIN) || defined(Q_OS_MAC) -+#if defined(Q_OS_WIN) - qtTranslator->load("qt_" + locale, translationsPath(locale)); - #else -- qtTranslator->load("qt_" + locale, QLibraryInfo::location(QLibraryInfo::TranslationsPath)); -+ qtTranslator->load("qt_" + locale, QLatin1String("@qttranslations@/translations")); - #endif - installTranslator(qtTranslator); - - qtxmlTranslator = new QTranslator(this); --#if defined(Q_OS_WIN) || defined(Q_OS_MAC) -+#if defined(Q_OS_WIN) - qtxmlTranslator->load("qtxmlpatterns_" + locale, translationsPath(locale)); - #else -- qtxmlTranslator->load("qtxmlpatterns_" + locale, QLibraryInfo::location(QLibraryInfo::TranslationsPath)); -+ qtxmlTranslator->load("qtxmlpatterns_" + locale, QLatin1String("@qttranslations@/translations")); - #endif - installTranslator(qtxmlTranslator); - - qtBaseTranslator = new QTranslator(this); --#if defined(Q_OS_WIN) || defined(Q_OS_MAC) -+#if defined(Q_OS_WIN) - qtBaseTranslator->load("qtbase_" + locale, translationsPath(locale)); - #else -- qtBaseTranslator->load("qtbase_" + locale, QLibraryInfo::location(QLibraryInfo::TranslationsPath)); -+ qtBaseTranslator->load("qtbase_" + locale, QLatin1String("@qttranslations@/translations")); - #endif - installTranslator(qtBaseTranslator); - diff --git a/pkgs/applications/networking/instant-messengers/linphone/default.nix b/pkgs/applications/networking/instant-messengers/linphone/default.nix index 0002e1d57de5..ebf3341e309a 100644 --- a/pkgs/applications/networking/instant-messengers/linphone/default.nix +++ b/pkgs/applications/networking/instant-messengers/linphone/default.nix @@ -12,7 +12,7 @@ , mkDerivation , qtgraphicaleffects , qtquickcontrols2 -, qttranslations +, qttools }: # How to update Linphone? (The Qt desktop app) @@ -73,11 +73,11 @@ mkDerivation rec { minizip-ng qtgraphicaleffects qtquickcontrols2 - qttranslations ]; nativeBuildInputs = [ cmake + qttools ]; cmakeFlags = [ diff --git a/pkgs/applications/networking/instant-messengers/qtox/default.nix b/pkgs/applications/networking/instant-messengers/qtox/default.nix index 659b6411b48a..8273a6fdbc6d 100644 --- a/pkgs/applications/networking/instant-messengers/qtox/default.nix +++ b/pkgs/applications/networking/instant-messengers/qtox/default.nix @@ -12,7 +12,6 @@ , qtbase , qtsvg , qttools -, qttranslations , ffmpeg , filter-audio , libexif @@ -44,7 +43,6 @@ mkDerivation rec { libXScrnSaver qtbase qtsvg - qttranslations ffmpeg filter-audio libexif diff --git a/pkgs/applications/networking/mailreaders/trojita/default.nix b/pkgs/applications/networking/mailreaders/trojita/default.nix index cd0a61f6636d..395e9b0f4e3f 100644 --- a/pkgs/applications/networking/mailreaders/trojita/default.nix +++ b/pkgs/applications/networking/mailreaders/trojita/default.nix @@ -16,8 +16,6 @@ , qtkeychain , qttools , qtwebkit -, qttranslations -, substituteAll , withI18n ? false }: @@ -39,12 +37,6 @@ in mkDerivation rec { sha256 = "sha256-15G9YjT3qBKbeOKfb/IgXOO+DaJaTULP9NJn/MFYZS8="; }; - patches = (substituteAll { - # See https://github.com/NixOS/nixpkgs/issues/86054 - src = ./fix-qttranslations-path.patch; - inherit qttranslations; - }); - buildInputs = [ akonadi-contacts gpgme diff --git a/pkgs/applications/networking/mailreaders/trojita/fix-qttranslations-path.patch b/pkgs/applications/networking/mailreaders/trojita/fix-qttranslations-path.patch deleted file mode 100644 index c4eac3956508..000000000000 --- a/pkgs/applications/networking/mailreaders/trojita/fix-qttranslations-path.patch +++ /dev/null @@ -1,13 +0,0 @@ -diff --git i/src/Gui/main.cpp w/src/Gui/main.cpp -index 851db4f1..e997f46e 100644 ---- i/src/Gui/main.cpp -+++ w/src/Gui/main.cpp -@@ -52,7 +52,7 @@ int main(int argc, char **argv) - - QTranslator qtTranslator; - qtTranslator.load(QLatin1String("qt_") + QLocale::system().name(), -- QLibraryInfo::location(QLibraryInfo::TranslationsPath)); -+ QLatin1String("@qttranslations@/translations")); - app.installTranslator(&qtTranslator); - - QLatin1String localeSuffix("/locale"); diff --git a/pkgs/applications/office/PageEdit/default.nix b/pkgs/applications/office/PageEdit/default.nix index b95eb6cb51e4..858995c05fa7 100644 --- a/pkgs/applications/office/PageEdit/default.nix +++ b/pkgs/applications/office/PageEdit/default.nix @@ -1,4 +1,4 @@ -{ lib, stdenv, mkDerivation, fetchFromGitHub, cmake, qtsvg, qtwebengine, qttranslations, wrapQtAppsHook }: +{ lib, stdenv, fetchFromGitHub, cmake, qtsvg, qtwebengine, wrapQtAppsHook, qttools }: stdenv.mkDerivation rec { pname = "pageedit"; @@ -11,7 +11,7 @@ stdenv.mkDerivation rec { hash = "sha256-naoflFANeMwabbdrNL3+ndvEXYT4Yqf+Mo77HcCexHE="; }; - nativeBuildInputs = [ cmake qttranslations wrapQtAppsHook ]; + nativeBuildInputs = [ cmake wrapQtAppsHook qttools ]; propagatedBuildInputs = [ qtsvg qtwebengine ]; cmakeFlags = [ "-DINSTALL_BUNDLED_DICTS=0" ]; diff --git a/pkgs/applications/science/astronomy/stellarium/default.nix b/pkgs/applications/science/astronomy/stellarium/default.nix index 00b36de28089..e2e1cda4c259 100644 --- a/pkgs/applications/science/astronomy/stellarium/default.nix +++ b/pkgs/applications/science/astronomy/stellarium/default.nix @@ -11,13 +11,13 @@ , qtpositioning , qtmultimedia , qtserialport -, qttranslations , qtwayland , qtwebengine , calcmysky , qxlsx , indilib , libnova +, qttools }: stdenv.mkDerivation rec { @@ -52,6 +52,7 @@ stdenv.mkDerivation rec { perl wrapGAppsHook wrapQtAppsHook + qttools ]; buildInputs = [ @@ -60,7 +61,6 @@ stdenv.mkDerivation rec { qtpositioning qtmultimedia qtserialport - qttranslations qtwebengine calcmysky qxlsx diff --git a/pkgs/development/libraries/kdb/default.nix b/pkgs/development/libraries/kdb/default.nix index 5ab33fcf46fd..f9aa5dc369c6 100644 --- a/pkgs/development/libraries/kdb/default.nix +++ b/pkgs/development/libraries/kdb/default.nix @@ -4,12 +4,12 @@ , fetchpatch , extra-cmake-modules , qtbase -, qttranslations , kcoreaddons , python3 , sqlite , postgresql , libmysqlclient +, qttools }: mkDerivation rec { @@ -34,9 +34,9 @@ mkDerivation rec { }) ]; - nativeBuildInputs = [ extra-cmake-modules ]; + nativeBuildInputs = [ extra-cmake-modules qttools ]; - buildInputs = [ qttranslations kcoreaddons python3 sqlite postgresql libmysqlclient ]; + buildInputs = [ kcoreaddons python3 sqlite postgresql libmysqlclient ]; propagatedBuildInputs = [ qtbase ]; diff --git a/pkgs/development/libraries/kde-frameworks/kirigami2.nix b/pkgs/development/libraries/kde-frameworks/kirigami2.nix index 281a490bf90a..a47182fda5e5 100644 --- a/pkgs/development/libraries/kde-frameworks/kirigami2.nix +++ b/pkgs/development/libraries/kde-frameworks/kirigami2.nix @@ -1,8 +1,8 @@ -{ mkDerivation, extra-cmake-modules, qtbase, qtquickcontrols2, qttranslations, qtgraphicaleffects }: +{ mkDerivation, extra-cmake-modules, qtbase, qtquickcontrols2, qtgraphicaleffects, qttools }: mkDerivation { pname = "kirigami2"; - nativeBuildInputs = [ extra-cmake-modules ]; - buildInputs = [ qtbase qtquickcontrols2 qttranslations qtgraphicaleffects ]; + nativeBuildInputs = [ extra-cmake-modules qttools ]; + buildInputs = [ qtbase qtquickcontrols2 qtgraphicaleffects ]; outputs = [ "out" "dev" ]; } diff --git a/pkgs/games/qgo/default.nix b/pkgs/games/qgo/default.nix index cc28ebc63f3c..ec7986c6a36b 100644 --- a/pkgs/games/qgo/default.nix +++ b/pkgs/games/qgo/default.nix @@ -4,7 +4,7 @@ , qmake , qtbase , qtmultimedia -, qttranslations +, qttools }: mkDerivation { @@ -41,6 +41,6 @@ mkDerivation { postPatch = '' sed -i 's|@out@|'"''${out}"'|g' src/src.pro src/defines.h ''; - nativeBuildInputs = [ qmake ]; - buildInputs = [ qtbase qtmultimedia qttranslations ]; + nativeBuildInputs = [ qmake qttools ]; + buildInputs = [ qtbase qtmultimedia ]; } diff --git a/pkgs/tools/misc/ksnip/default.nix b/pkgs/tools/misc/ksnip/default.nix index 853db8ab45a5..bae675b49599 100644 --- a/pkgs/tools/misc/ksnip/default.nix +++ b/pkgs/tools/misc/ksnip/default.nix @@ -7,7 +7,7 @@ , kimageannotator , wrapQtAppsHook , qtsvg -, qttranslations +, qttools , qtx11extras }: @@ -26,13 +26,13 @@ stdenv.mkDerivation rec { cmake extra-cmake-modules wrapQtAppsHook + qttools ]; buildInputs = [ kcolorpicker kimageannotator qtsvg - qttranslations qtx11extras ]; diff --git a/pkgs/tools/security/nitrokey-app/default.nix b/pkgs/tools/security/nitrokey-app/default.nix index 8f8991801f7c..d48047a7b1c6 100644 --- a/pkgs/tools/security/nitrokey-app/default.nix +++ b/pkgs/tools/security/nitrokey-app/default.nix @@ -3,10 +3,10 @@ , cmake , fetchFromGitHub , pkg-config -, qttranslations , wrapQtAppsHook , libnitrokey , cppcodec +, qttools }: stdenv.mkDerivation rec { @@ -24,7 +24,7 @@ stdenv.mkDerivation rec { cmake pkg-config wrapQtAppsHook - qttranslations + qttools ]; cmakeFlags = [ diff --git a/pkgs/tools/security/qdigidoc/default.nix b/pkgs/tools/security/qdigidoc/default.nix index 19ce14f915aa..8a8fa4496c38 100644 --- a/pkgs/tools/security/qdigidoc/default.nix +++ b/pkgs/tools/security/qdigidoc/default.nix @@ -10,8 +10,8 @@ , openssl , pcsclite , qtbase -, qttranslations , qtsvg +, qttools }: mkDerivation rec { @@ -29,7 +29,7 @@ mkDerivation rec { sha256 = "1cikz36w9phgczcqnwk4k3mx3kk919wy2327jksmfa4cjfjq4a8d"; }; - nativeBuildInputs = [ cmake gettext pkg-config ]; + nativeBuildInputs = [ cmake gettext pkg-config qttools ]; postPatch = '' substituteInPlace client/CMakeLists.txt \ @@ -44,7 +44,6 @@ mkDerivation rec { pcsclite qtbase qtsvg - qttranslations ]; # qdigidoc4's `QPKCS11::reload()` dlopen()s "opensc-pkcs11.so" in QLibrary, diff --git a/pkgs/tools/security/web-eid-app/default.nix b/pkgs/tools/security/web-eid-app/default.nix index f392fb0147bd..3c89790e2ffc 100644 --- a/pkgs/tools/security/web-eid-app/default.nix +++ b/pkgs/tools/security/web-eid-app/default.nix @@ -5,7 +5,7 @@ , gtest , pcsclite , pkg-config -, qttranslations +, qttools }: mkDerivation rec { @@ -23,12 +23,12 @@ mkDerivation rec { nativeBuildInputs = [ cmake pkg-config + qttools ]; buildInputs = [ gtest # required during build of lib/libelectronic-id/lib/libpcsc-cpp pcsclite - qttranslations ]; meta = with lib; {