gpxlab: fix localization (#124012)
Co-authored-by: Guillaume Girol <symphorien@users.noreply.github.com>
This commit is contained in:
parent
258c882573
commit
0e4294fd3e
@ -1,4 +1,6 @@
|
||||
{ stdenv, mkDerivation, lib, fetchFromGitHub, qmake, qttools, qttranslations }:
|
||||
{ stdenv, mkDerivation, lib, fetchFromGitHub, substituteAll
|
||||
, qmake, qttools, qttranslations
|
||||
}:
|
||||
|
||||
mkDerivation rec {
|
||||
pname = "gpxlab";
|
||||
@ -11,8 +13,13 @@ mkDerivation rec {
|
||||
sha256 = "080vnwcciqblfrbfyz9gjhl2lqw1hkdpbgr5qfrlyglkd4ynjd84";
|
||||
};
|
||||
|
||||
nativeBuildInputs = [ qmake ];
|
||||
buildInputs = [ qttools qttranslations ];
|
||||
patches = (substituteAll {
|
||||
# See https://github.com/NixOS/nixpkgs/issues/86054
|
||||
src = ./fix-qttranslations-path.patch;
|
||||
inherit qttranslations;
|
||||
});
|
||||
|
||||
nativeBuildInputs = [ qmake qttools ];
|
||||
|
||||
preConfigure = ''
|
||||
lrelease GPXLab/locale/*.ts
|
||||
@ -24,8 +31,6 @@ mkDerivation rec {
|
||||
wrapQtApp $out/Applications/GPXLab.app/Contents/MacOS/GPXLab
|
||||
'';
|
||||
|
||||
enableParallelBuilding = true;
|
||||
|
||||
meta = with lib; {
|
||||
homepage = "https://github.com/BourgeoisLab/GPXLab";
|
||||
description = "Program to show and manipulate GPS tracks";
|
||||
@ -33,8 +38,8 @@ mkDerivation rec {
|
||||
GPXLab is an application to display and manage GPS tracks
|
||||
previously recorded with a GPS tracker.
|
||||
'';
|
||||
license = licenses.gpl3;
|
||||
license = licenses.gpl3Only;
|
||||
maintainers = with maintainers; [ sikmir ];
|
||||
platforms = with platforms; linux ++ darwin;
|
||||
platforms = platforms.unix;
|
||||
};
|
||||
}
|
||||
|
17
pkgs/applications/misc/gpxlab/fix-qttranslations-path.patch
Normal file
17
pkgs/applications/misc/gpxlab/fix-qttranslations-path.patch
Normal file
@ -0,0 +1,17 @@
|
||||
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);
|
||||
|
Loading…
Reference in New Issue
Block a user