Merge pull request #90585 from ymarkus/master
birdtray: fix qttranslations path
This commit is contained in:
commit
64b395ec57
@ -7,6 +7,7 @@
|
||||
, qtbase
|
||||
, qttools
|
||||
, qtx11extras
|
||||
, qttranslations
|
||||
}:
|
||||
|
||||
mkDerivation rec {
|
||||
@ -20,11 +21,21 @@ mkDerivation rec {
|
||||
sha256 = "15l8drdmamq1dpqpj0h9ajj2r5vcs23cx421drvhfgs6bqlzd1hl";
|
||||
};
|
||||
|
||||
patches = [
|
||||
# See https://github.com/NixOS/nixpkgs/issues/86054
|
||||
./fix-qttranslations-path.diff
|
||||
];
|
||||
|
||||
nativeBuildInputs = [ cmake pkgconfig ];
|
||||
buildInputs = [
|
||||
qtbase qttools qtx11extras
|
||||
];
|
||||
|
||||
postPatch = ''
|
||||
substituteInPlace src/birdtrayapp.cpp \
|
||||
--subst-var-by qttranslations ${qttranslations}
|
||||
'';
|
||||
|
||||
meta = with lib; {
|
||||
description = "Mail system tray notification icon for Thunderbird";
|
||||
homepage = "https://github.com/gyunaev/birdtray";
|
||||
|
13
pkgs/applications/misc/birdtray/fix-qttranslations-path.diff
Normal file
13
pkgs/applications/misc/birdtray/fix-qttranslations-path.diff
Normal file
@ -0,0 +1,13 @@
|
||||
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;
|
Loading…
Reference in New Issue
Block a user