1{
2 lib,
3 mkDerivation,
4 fetchFromGitHub,
5 cmake,
6 pkg-config,
7 qtbase,
8 qtgraphicaleffects,
9 wrapQtAppsHook,
10 udevCheckHook,
11}:
12
13mkDerivation rec {
14 pname = "projecteur";
15 version = "0.10";
16
17 src = fetchFromGitHub {
18 owner = "jahnf";
19 repo = "Projecteur";
20 rev = "v${version}";
21 fetchSubmodules = false;
22 hash = "sha256-F7o93rBjrDTmArTIz8RB/uGBOYE6ny/U7ppk+jEhM5A=";
23 };
24
25 postPatch = ''
26 sed '1i#include <array>' -i src/device.h # gcc12
27 '';
28
29 buildInputs = [
30 qtbase
31 qtgraphicaleffects
32 ];
33
34 nativeBuildInputs = [
35 cmake
36 pkg-config
37 wrapQtAppsHook
38 udevCheckHook
39 ];
40
41 doInstallCheck = true;
42
43 cmakeFlags = [
44 "-DCMAKE_INSTALL_PREFIX:PATH=${placeholder "out"}"
45 "-DPACKAGE_TARGETS=OFF"
46 "-DCMAKE_INSTALL_UDEVRULESDIR=${placeholder "out"}/lib/udev/rules.d"
47 ];
48
49 meta = {
50 description = "Linux/X11 application for the Logitech Spotlight device (and similar devices)";
51 homepage = "https://github.com/jahnf/Projecteur";
52 license = lib.licenses.mit;
53 mainProgram = "projecteur";
54 maintainers = with lib.maintainers; [
55 benneti
56 drupol
57 ];
58 platforms = lib.platforms.linux;
59 };
60}