summary refs log tree commit diff
path: root/pkgs/os-specific/linux/roccat-tools
diff options
context:
space:
mode:
authoraszlig <aszlig@nix.build>2018-09-28 21:40:23 +0200
committeraszlig <aszlig@nix.build>2018-09-28 22:15:46 +0200
commitc502dd8a5b8af017007adddf73e614fc7bfbbe51 (patch)
tree33c57e6af70f782dce46880579f88134951be095 /pkgs/os-specific/linux/roccat-tools
parente9300aa12c9c18c1214df84ca50ba9b41b2f165f (diff)
downloadnixpkgs-c502dd8a5b8af017007adddf73e614fc7bfbbe51.tar
nixpkgs-c502dd8a5b8af017007adddf73e614fc7bfbbe51.tar.gz
nixpkgs-c502dd8a5b8af017007adddf73e614fc7bfbbe51.tar.bz2
nixpkgs-c502dd8a5b8af017007adddf73e614fc7bfbbe51.tar.lz
nixpkgs-c502dd8a5b8af017007adddf73e614fc7bfbbe51.tar.xz
nixpkgs-c502dd8a5b8af017007adddf73e614fc7bfbbe51.tar.zst
nixpkgs-c502dd8a5b8af017007adddf73e614fc7bfbbe51.zip
roccat-tools: init at 5.7.0
I had this package along with libgaminggear laying around since June
2016[1] and basically just did the setup for the ROCCAT device once and
never touched it again since then. However, I got requests from other
users who might need this, so I decided to finally upstream it along
with using the latest versions.

There were a few hardcoded paths to fix, like eg. /etc/xdg and another
one that used /var/lib/roccat, the latter I moved into $XDG_DATA_HOME
instead.

The reason why I put it in os-specific/linux is that the official site
explicitly states that it's for Linux only and I specified the platforms
attribute accordingly.

[1]: https://gist.github.com/aszlig/3a01c0c23254a68c2be4c6df59e26862

Signed-off-by: aszlig <aszlig@nix.build>
Cc: @devhell
Diffstat (limited to 'pkgs/os-specific/linux/roccat-tools')
-rw-r--r--pkgs/os-specific/linux/roccat-tools/default.nix41
1 files changed, 41 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 00000000000..a413008ffd1
--- /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;
+  };
+}