about summary refs log tree commit diff
diff options
context:
space:
mode:
-rw-r--r--pkgs/os-specific/linux/roccat-tools/default.nix41
-rw-r--r--pkgs/top-level/all-packages.nix2
2 files changed, 43 insertions, 0 deletions
diff --git a/pkgs/os-specific/linux/roccat-tools/default.nix b/pkgs/os-specific/linux/roccat-tools/default.nix
new file mode 100644
index 000000000000..a413008ffd1a
--- /dev/null
+++ b/pkgs/os-specific/linux/roccat-tools/default.nix
@@ -0,0 +1,41 @@
+{ stdenv, fetchurl, cmake, pkgconfig, gettext
+, dbus, dbus_glib, libgaminggear, libgudev, lua
+}:
+
+stdenv.mkDerivation rec {
+  name = "roccat-tools-${version}";
+  version = "5.7.0";
+
+  src = fetchurl {
+    url = "mirror://sourceforge/roccat/${name}.tar.bz2";
+    sha256 = "15gxplcm62167xhk65k8v6gg3j6jr0c5a64wlz72y1vfq0ai7qm6";
+  };
+
+  postPatch = ''
+    sed -i -re 's,/(etc/xdg),\1,' roccateventhandler/CMakeLists.txt
+
+    sed -i -e '/roccat_profile_dir(void).*{/,/}/ {
+      /return/c \
+        return g_build_path("/", g_get_user_data_dir(), "roccat", NULL);
+    }' libroccat/roccat_helper.c
+  '';
+
+  nativeBuildInputs = [ cmake pkgconfig gettext ];
+  buildInputs = [ dbus dbus_glib libgaminggear libgudev lua ];
+
+  enableParallelBuilding = true;
+
+  cmakeFlags = [
+    "-DUDEVDIR=\${out}/lib/udev/rules.d"
+    "-DCMAKE_MODULE_PATH=${libgaminggear.dev}/lib/cmake"
+    "-DWITH_LUA=${lua.luaversion}"
+    "-DLIBDIR=lib"
+  ];
+
+  meta = {
+    description = "Tools to configure ROCCAT devices";
+    homepage = http://roccat.sourceforge.net/;
+    platforms = stdenv.lib.platforms.linux;
+    license = stdenv.lib.licenses.gpl2Plus;
+  };
+}
diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix
index 68a98ba5e726..65fdd745e4dd 100644
--- a/pkgs/top-level/all-packages.nix
+++ b/pkgs/top-level/all-packages.nix
@@ -14661,6 +14661,8 @@ with pkgs;
     payload = "${linux_riscv}/vmlinux";
   };
 
+  roccat-tools = callPackage ../os-specific/linux/roccat-tools { };
+
   rtkit = callPackage ../os-specific/linux/rtkit { };
 
   rt5677-firmware = callPackage ../os-specific/linux/firmware/rt5677 { };