Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

gpxsee: 7.29 -> 7.30 #89290

Merged
merged 1 commit into from
Jun 1, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 13 additions & 3 deletions pkgs/applications/misc/gpxsee/default.nix
Original file line number Diff line number Diff line change
@@ -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
'';
Expand Down
18 changes: 18 additions & 0 deletions pkgs/applications/misc/gpxsee/fix-qttranslations-path.diff
Original file line number Diff line number Diff line change
@@ -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);