nixpkgs mirror (for testing)
github.com/NixOS/nixpkgs
nix
1{
2 lib,
3 stdenv,
4 fetchFromGitHub,
5
6 # buildInputs
7 libXScrnSaver,
8 magic-enum,
9
10 # nativeBuildInputs
11 qtbase,
12 qtconnectivity,
13 qtlanguageserver,
14 qttools,
15 range-v3,
16 spdlog,
17 qtwayland,
18
19 # nativeBuildInputs
20 cmake,
21 wrapQtAppsHook,
22
23 # passthru
24 nix-update-script,
25}:
26
27stdenv.mkDerivation (finalAttrs: {
28 pname = "kemai";
29 version = "0.11.1";
30
31 src = fetchFromGitHub {
32 owner = "AlexandrePTJ";
33 repo = "kemai";
34 tag = finalAttrs.version;
35 hash = "sha256-2Cyrd0fKaEHkDaKF8lFwuoLvl6553rp3ET2xLUUrTnk=";
36 };
37
38 postPatch = ''
39 substituteInPlace \
40 src/client/parser.cpp \
41 src/client/kimaiCache.cpp \
42 --replace-fail \
43 "#include <magic_enum.hpp>" \
44 "#include <magic_enum/magic_enum.hpp>"
45 '';
46
47 buildInputs = [
48 libXScrnSaver
49 magic-enum
50 qtbase
51 qtconnectivity
52 qtlanguageserver
53 qttools
54 range-v3
55 spdlog
56 ]
57 ++ lib.optional stdenv.hostPlatform.isLinux qtwayland;
58
59 cmakeFlags = [
60 (lib.cmakeBool "KEMAI_ENABLE_UPDATE_CHECK" false)
61 (lib.cmakeBool "KEMAI_BUILD_LOCAL_DEPENDENCIES" false)
62 ];
63
64 nativeBuildInputs = [
65 cmake
66 wrapQtAppsHook
67 ];
68
69 passthru = {
70 updateScript = nix-update-script { };
71 };
72
73 meta = {
74 description = "Kimai desktop client written in QT6";
75 homepage = "https://github.com/AlexandrePTJ/kemai";
76 changelog = "https://github.com/AlexandrePTJ/kemai/blob/${finalAttrs.version}/CHANGELOG.md";
77 license = lib.licenses.mit;
78 maintainers = with lib.maintainers; [ poelzi ];
79 platforms = lib.platforms.unix;
80 badPlatforms = [ lib.systems.inspect.patterns.isDarwin ];
81 mainProgram = "Kemai";
82 };
83})