gpxsee: 7.29 -> 7.30 (#89290)
This commit is contained in:
parent
ab327b27a1
commit
d5117e795f
|
@ -1,18 +1,28 @@
|
|||
{ stdenv, mkDerivation, fetchFromGitHub, qmake, qttools }:
|
||||
{ stdenv, mkDerivation, fetchFromGitHub, qmake, qttools, qttranslations }:
|
||||
|
||||
mkDerivation rec {
|
||||
pname = "gpxsee";
|
||||
version = "7.29";
|
||||
version = "7.30";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "tumic0";
|
||||
repo = "GPXSee";
|
||||
rev = version;
|
||||
sha256 = "sha256-OTKyxEu7RZZy3JBHTM7YoH+G4lhoRfb1INLtQEKC5p4=";
|
||||
sha256 = "09gajwqc30r9a2sn972qdx3gx0gki9n0zafq986hn6zsr3z43mfs";
|
||||
};
|
||||
|
||||
patches = [
|
||||
# See https://github.com/NixOS/nixpkgs/issues/86054
|
||||
./fix-qttranslations-path.diff
|
||||
];
|
||||
|
||||
nativeBuildInputs = [ qmake qttools ];
|
||||
|
||||
postPatch = ''
|
||||
substituteInPlace src/GUI/app.cpp \
|
||||
--subst-var-by qttranslations ${qttranslations}
|
||||
'';
|
||||
|
||||
preConfigure = ''
|
||||
lrelease gpxsee.pro
|
||||
'';
|
||||
|
|
18
pkgs/applications/misc/gpxsee/fix-qttranslations-path.diff
Normal file
18
pkgs/applications/misc/gpxsee/fix-qttranslations-path.diff
Normal file
|
@ -0,0 +1,18 @@
|
|||
diff --git i/src/GUI/app.cpp w/src/GUI/app.cpp
|
||||
index 10e84d5..1e0abbe 100644
|
||||
--- i/src/GUI/app.cpp
|
||||
+++ w/src/GUI/app.cpp
|
||||
@@ -34,11 +34,10 @@ App::App(int &argc, char **argv) : QApplication(argc, argv)
|
||||
installTranslator(gpxsee);
|
||||
|
||||
QTranslator *qt = new QTranslator(this);
|
||||
-#if defined(Q_OS_WIN32) || defined(Q_OS_MAC)
|
||||
+#if defined(Q_OS_WIN32)
|
||||
qt->load(QLocale::system(), "qt", "_", ProgramPaths::translationsDir());
|
||||
#else // Q_OS_WIN32 || Q_OS_MAC
|
||||
- qt->load(QLocale::system(), "qt", "_", QLibraryInfo::location(
|
||||
- QLibraryInfo::TranslationsPath));
|
||||
+ qt->load(QLocale::system(), "qt", "_", QLatin1String("@qttranslations@/translations"));
|
||||
#endif // Q_OS_WIN32 || Q_OS_MAC
|
||||
installTranslator(qt);
|
||||
|
Loading…
Reference in a new issue