nur-packages

My NUR packages
git clone git://git.sikmir.ru/nur-packages
Log | Files | Refs | README | LICENSE

commit cc060d15cd46302516021f6e32e0f72a4348847e
parent dfe27d331063520543e147329c7ffe6c7bfb184c
Author: Nikolay Korotkiy <sikmir@gmail.com>
Date:   Sun, 26 Apr 2020 22:11:44 +0300

openorienteering-mapper: fix qttranslations path

Diffstat:
Mpkgs/applications/openorienteering-mapper/default.nix | 11+++++++++++
Apkgs/applications/openorienteering-mapper/fix-qttranslations-path.diff | 13+++++++++++++
2 files changed, 24 insertions(+), 0 deletions(-)

diff --git a/pkgs/applications/openorienteering-mapper/default.nix b/pkgs/applications/openorienteering-mapper/default.nix @@ -10,6 +10,7 @@ , qttools , qtlocation , qtsensors +, qttranslations , doxygen , cups , wrapQtAppsHook @@ -22,6 +23,11 @@ stdenv.mkDerivation rec { version = lib.substring 0 7 src.rev; src = sources.mapper; + patches = [ + # See https://github.com/NixOS/nixpkgs/issues/86054 + ./fix-qttranslations-path.diff + ]; + buildInputs = [ gdal qtbase @@ -38,6 +44,11 @@ stdenv.mkDerivation rec { nativeBuildInputs = [ cmake wrapQtAppsHook ninja ]; + postPatch = '' + substituteInPlace src/util/translation_util.cpp \ + --subst-var-by qttranslations ${qttranslations} + ''; + cmakeFlags = [ # Building the manual and bundling licenses fails "-DLICENSING_PROVIDER:BOOL=OFF" diff --git a/pkgs/applications/openorienteering-mapper/fix-qttranslations-path.diff b/pkgs/applications/openorienteering-mapper/fix-qttranslations-path.diff @@ -0,0 +1,13 @@ +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);