Commit 6edd6f71 authored by K900's avatar K900
Browse files

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.
parent 4d0a7641
Loading
Loading
Loading
Loading
+2 −3
Original line number Diff line number Diff line
@@ -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; {
+0 −2
Original line number Diff line number Diff line
@@ -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
+0 −7
Original line number Diff line number Diff line
@@ -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";
+0 −13
Original line number Diff line number Diff line
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);
+2 −10
Original line number Diff line number Diff line
{ 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 ];
Loading