summary refs log tree commit diff
path: root/pkgs/os-specific/linux/projecteur/default.nix
diff options
context:
space:
mode:
Diffstat (limited to 'pkgs/os-specific/linux/projecteur/default.nix')
-rw-r--r--pkgs/os-specific/linux/projecteur/default.nix52
1 files changed, 52 insertions, 0 deletions
diff --git a/pkgs/os-specific/linux/projecteur/default.nix b/pkgs/os-specific/linux/projecteur/default.nix
new file mode 100644
index 00000000000..0477985cc19
--- /dev/null
+++ b/pkgs/os-specific/linux/projecteur/default.nix
@@ -0,0 +1,52 @@
+{ lib
+, mkDerivation
+, fetchFromGitHub
+, cmake
+, pkg-config
+, qtbase
+, qtgraphicaleffects
+, wrapQtAppsHook
+}:
+
+mkDerivation rec {
+  pname = "projecteur";
+  version = "0.10";
+
+  src = fetchFromGitHub {
+    owner = "jahnf";
+    repo = "Projecteur";
+    rev = "v${version}";
+    fetchSubmodules = false;
+    hash = "sha256-F7o93rBjrDTmArTIz8RB/uGBOYE6ny/U7ppk+jEhM5A=";
+  };
+
+  postPatch = ''
+    sed '1i#include <array>' -i src/device.h # gcc12
+  '';
+
+  buildInputs = [
+    qtbase
+    qtgraphicaleffects
+  ];
+
+  nativeBuildInputs = [
+    cmake
+    pkg-config
+    wrapQtAppsHook
+  ];
+
+  cmakeFlags = [
+    "-DCMAKE_INSTALL_PREFIX:PATH=${placeholder "out"}"
+    "-DPACKAGE_TARGETS=OFF"
+    "-DCMAKE_INSTALL_UDEVRULESDIR=${placeholder "out"}/lib/udev/rules.d"
+  ];
+
+  meta = {
+    description = "Linux/X11 application for the Logitech Spotlight device (and similar devices).";
+    homepage = "https://github.com/jahnf/Projecteur";
+    license = lib.licenses.mit;
+    mainProgram = "projecteur";
+    maintainers = with lib.maintainers; [ benneti drupol ];
+    platforms = lib.platforms.linux;
+  };
+}