about summary refs log tree commit diff
path: root/pkgs/applications/misc/kemai/default.nix
blob: 70941045ce36804c7e1af97bfb0519a9280b5a0e (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
68
69
70
{ lib
, stdenv
, fetchFromGitHub
, fetchpatch
, cmake
, magic-enum
, range-v3
, spdlog
, qtbase
, qtconnectivity
, qttools
, qtlanguageserver
, qtwayland
, wrapQtAppsHook
, libXScrnSaver
, nix-update-script
}:

stdenv.mkDerivation rec {
  pname = "kemai";
  version = "0.10.0";

  src = fetchFromGitHub {
    owner = "AlexandrePTJ";
    repo = "kemai";
    rev = version;
    hash = "sha256-wclBAgeDyAIw/nGF6lzIwbwdoZMBTu+tjxsnIxIkODM=";
  };

  patches = [
    # Backport the fix for an issue where LICENSE.txt ends up in /bin
    # Remove in next release
    (fetchpatch {
      url = "https://github.com/AlexandrePTJ/kemai/commit/e279679dd7308efebe004252d168d7308f3b99ce.patch";
      hash = "sha256-5cmRRMVATf4ul4HhaQKiE0yTN2qd+MfNFQzGTLLpOyg=";
    })
  ];

  buildInputs = [
    qtbase
    qtconnectivity
    qttools
    qtlanguageserver
    libXScrnSaver
    magic-enum
    range-v3
    spdlog
  ] ++ lib.optional stdenv.hostPlatform.isLinux qtwayland;
  cmakeFlags = [
    "-DFETCHCONTENT_FULLY_DISCONNECTED=ON"
    "-DFETCHCONTENT_QUIET=OFF"
    "-DFETCHCONTENT_TRY_FIND_PACKAGE_MODE=ALWAYS"
  ];

  nativeBuildInputs = [ cmake wrapQtAppsHook ];

  passthru = {
    updateScript = nix-update-script { };
  };

  meta = with lib; {
    description = "Kimai desktop client written in QT6";
    homepage = "https://github.com/AlexandrePTJ/kemai";
    license = licenses.mit;
    maintainers = with maintainers; [ poelzi ];
    platforms   = platforms.unix;
    broken = stdenv.isDarwin;
    mainProgram = "Kemai";
  };
}