about summary refs log tree commit diff
path: root/pkgs/applications/gis/zombietrackergps/default.nix
blob: 47a4329ae19d91f80ab50dd26432c593eda94832 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
{ mkDerivation
, lib
, fetchFromGitLab
, qmake
, qtcharts
, qtsvg
, marble
, qtwebengine
, ldutils
}:

mkDerivation rec {
  pname = "zombietrackergps";
  version = "1.10";

  src = fetchFromGitLab {
    owner = "ldutils-projects";
    repo = pname;
    rev = "v_${version}";
    sha256 = "sha256-qRhCAOVWyDLD3WDptPRQVq+VwyFu83XQNaL5TMsGs4Y=";
  };

  buildInputs = [
    ldutils
    qtcharts
    qtsvg
    marble.dev
    qtwebengine
  ];

  nativeBuildInputs = [
    qmake
  ];

  prePatch = ''
    substituteInPlace ztgps.pro --replace "../libldutils" "libldutils"
    substituteInPlace tests.pro --replace "../libldutils" "libldutils"

    ln -s ${ldutils} libldutils
  '';

  preConfigure = ''
    export LANG=en_US.UTF-8
    export INSTALL_ROOT=$out
  '';

  preInstall = ''
    substituteInPlace Makefile.ztgps --replace '$(INSTALL_ROOT)' ""
    substituteInPlace Makefile.art --replace '$(INSTALL_ROOT)' ""
  '';

  postInstall = ''
    install -Dm644 build/rcc/*.rcc -t $out/share/zombietrackergps
  '';

  qmakeFlags = [ "ZombieTrackerGPS.pro" ];

  meta = with lib; {
    description = "GPS track manager for Qt using KDE Marble maps";
    homepage = "https://www.zombietrackergps.net/ztgps/";
    changelog = "https://www.zombietrackergps.net/ztgps/history.html";
    license = licenses.gpl3Plus;
    maintainers = with maintainers; [ sohalt ];
    platforms = platforms.linux;
    broken = true;  # doesn't build with latest Marble
  };
}