2022-11-27 09:42:12 +00:00
|
|
|
{ lib
|
|
|
|
, stdenv
|
|
|
|
, fetchFromGitHub
|
|
|
|
, qmake
|
|
|
|
, nix-update-script
|
|
|
|
, substituteAll
|
|
|
|
, qtbase
|
|
|
|
, qttools
|
|
|
|
, qttranslations
|
|
|
|
, qtlocation ? null # qt5 only
|
|
|
|
, qtpositioning ? null # qt6 only
|
|
|
|
, qtpbfimageplugin
|
2023-03-15 16:39:30 +00:00
|
|
|
, qtserialport
|
2022-11-27 09:42:12 +00:00
|
|
|
, qtsvg
|
|
|
|
, qt5compat ? null # qt6 only
|
|
|
|
, wrapQtAppsHook
|
2022-09-09 14:08:57 +00:00
|
|
|
}:
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2022-11-27 09:42:12 +00:00
|
|
|
let
|
|
|
|
isQt6 = lib.versions.major qtbase.version == "6";
|
|
|
|
|
|
|
|
in
|
2021-12-19 01:06:50 +00:00
|
|
|
stdenv.mkDerivation rec {
|
2020-04-24 23:36:52 +00:00
|
|
|
pname = "gpxsee";
|
2023-03-15 16:39:30 +00:00
|
|
|
version = "12.2";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "tumic0";
|
|
|
|
repo = "GPXSee";
|
|
|
|
rev = version;
|
2023-03-15 16:39:30 +00:00
|
|
|
hash = "sha256-d+hQNI+eCSMRFMzq09wL+GN9TgOIt245Z8GlPe7nY8E=";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
2020-10-07 09:15:18 +00:00
|
|
|
patches = (substituteAll {
|
2020-06-02 18:00:15 +00:00
|
|
|
# See https://github.com/NixOS/nixpkgs/issues/86054
|
2020-10-07 09:15:18 +00:00
|
|
|
src = ./fix-qttranslations-path.diff;
|
|
|
|
inherit qttranslations;
|
|
|
|
});
|
2020-06-02 18:00:15 +00:00
|
|
|
|
2023-03-15 16:39:30 +00:00
|
|
|
buildInputs = [ qtpbfimageplugin qtserialport ]
|
2022-11-27 09:42:12 +00:00
|
|
|
++ (if isQt6 then [
|
|
|
|
qtbase
|
|
|
|
qtpositioning
|
|
|
|
qtsvg
|
|
|
|
qt5compat
|
|
|
|
] else [
|
|
|
|
qtlocation
|
|
|
|
]);
|
2021-12-19 01:06:50 +00:00
|
|
|
|
|
|
|
nativeBuildInputs = [ qmake qttools wrapQtAppsHook ];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
preConfigure = ''
|
2020-05-03 17:38:23 +00:00
|
|
|
lrelease gpxsee.pro
|
2020-04-24 23:36:52 +00:00
|
|
|
'';
|
|
|
|
|
2021-12-06 16:07:01 +00:00
|
|
|
postInstall = lib.optionalString stdenv.isDarwin ''
|
2020-04-24 23:36:52 +00:00
|
|
|
mkdir -p $out/Applications
|
|
|
|
mv GPXSee.app $out/Applications
|
2023-03-15 16:39:30 +00:00
|
|
|
mkdir -p $out/bin
|
|
|
|
ln -s $out/Applications/GPXSee.app/Contents/MacOS/GPXSee $out/bin/gpxsee
|
2020-04-24 23:36:52 +00:00
|
|
|
'';
|
|
|
|
|
2022-09-09 14:08:57 +00:00
|
|
|
passthru = {
|
2022-12-28 21:21:41 +00:00
|
|
|
updateScript = nix-update-script { };
|
2022-09-09 14:08:57 +00:00
|
|
|
};
|
|
|
|
|
2021-01-15 22:18:51 +00:00
|
|
|
meta = with lib; {
|
2020-04-24 23:36:52 +00:00
|
|
|
description = "GPS log file viewer and analyzer";
|
|
|
|
longDescription = ''
|
|
|
|
GPXSee is a Qt-based GPS log file viewer and analyzer that supports
|
|
|
|
all common GPS log file formats.
|
|
|
|
'';
|
2020-11-06 00:33:48 +00:00
|
|
|
homepage = "https://www.gpxsee.org/";
|
|
|
|
changelog = "https://build.opensuse.org/package/view_file/home:tumic:GPXSee/gpxsee/gpxsee.changes";
|
2020-12-29 15:07:52 +00:00
|
|
|
license = licenses.gpl3Only;
|
2020-04-24 23:36:52 +00:00
|
|
|
maintainers = with maintainers; [ womfoo sikmir ];
|
2021-06-01 10:57:12 +00:00
|
|
|
platforms = platforms.unix;
|
2022-11-27 09:42:12 +00:00
|
|
|
broken = isQt6 && stdenv.isDarwin;
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
}
|