birdtray: fix qttranslations path
birdtray crashes not finding the translations without this fix
This commit is contained in:
parent
5fea23b9c0
commit
fd474c0e0c
|
@ -7,6 +7,7 @@
|
||||||
, qtbase
|
, qtbase
|
||||||
, qttools
|
, qttools
|
||||||
, qtx11extras
|
, qtx11extras
|
||||||
|
, qttranslations
|
||||||
}:
|
}:
|
||||||
|
|
||||||
mkDerivation rec {
|
mkDerivation rec {
|
||||||
|
@ -20,11 +21,21 @@ mkDerivation rec {
|
||||||
sha256 = "15l8drdmamq1dpqpj0h9ajj2r5vcs23cx421drvhfgs6bqlzd1hl";
|
sha256 = "15l8drdmamq1dpqpj0h9ajj2r5vcs23cx421drvhfgs6bqlzd1hl";
|
||||||
};
|
};
|
||||||
|
|
||||||
|
patches = [
|
||||||
|
# See https://github.com/NixOS/nixpkgs/issues/86054
|
||||||
|
./fix-qttranslations-path.diff
|
||||||
|
];
|
||||||
|
|
||||||
nativeBuildInputs = [ cmake pkgconfig ];
|
nativeBuildInputs = [ cmake pkgconfig ];
|
||||||
buildInputs = [
|
buildInputs = [
|
||||||
qtbase qttools qtx11extras
|
qtbase qttools qtx11extras
|
||||||
];
|
];
|
||||||
|
|
||||||
|
postPatch = ''
|
||||||
|
substituteInPlace src/birdtrayapp.cpp \
|
||||||
|
--subst-var-by qttranslations ${qttranslations}
|
||||||
|
'';
|
||||||
|
|
||||||
meta = with lib; {
|
meta = with lib; {
|
||||||
description = "Mail system tray notification icon for Thunderbird";
|
description = "Mail system tray notification icon for Thunderbird";
|
||||||
homepage = "https://github.com/gyunaev/birdtray";
|
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 a new issue