2021-01-19 06:50:56 +00:00
|
|
|
{ lib, stdenv, fetchurl, cmake, pkg-config, gettext
|
2018-10-03 04:27:02 +00:00
|
|
|
, dbus, dbus-glib, libgaminggear, libgudev, lua
|
2022-08-25 20:24:32 +00:00
|
|
|
, harfbuzz, runtimeShell, coreutils, kmod
|
2018-09-28 19:40:23 +00:00
|
|
|
}:
|
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
2019-08-15 12:41:18 +00:00
|
|
|
pname = "roccat-tools";
|
2019-05-24 07:59:49 +00:00
|
|
|
version = "5.9.0";
|
2018-09-28 19:40:23 +00:00
|
|
|
|
|
|
|
src = fetchurl {
|
2019-08-15 12:41:18 +00:00
|
|
|
url = "mirror://sourceforge/roccat/${pname}-${version}.tar.bz2";
|
2019-05-24 07:59:49 +00:00
|
|
|
sha256 = "12j02rzbz3iqxprz8cj4kcfcdgnqlva142ci177axqmckcq6crvg";
|
2018-09-28 19:40:23 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
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
|
2022-08-25 20:24:32 +00:00
|
|
|
|
|
|
|
substituteInPlace udev/90-roccat-kone.rules \
|
|
|
|
--replace "/bin/sh" "${runtimeShell}" \
|
|
|
|
--replace "/sbin/modprobe" "${kmod}/bin/modprobe" \
|
|
|
|
--replace "/bin/echo" "${coreutils}/bin/echo"
|
2018-09-28 19:40:23 +00:00
|
|
|
'';
|
|
|
|
|
2021-01-19 06:50:56 +00:00
|
|
|
nativeBuildInputs = [ cmake pkg-config gettext ];
|
2018-10-03 04:27:02 +00:00
|
|
|
buildInputs = [ dbus dbus-glib libgaminggear libgudev lua ];
|
2018-09-28 19:40:23 +00:00
|
|
|
|
|
|
|
cmakeFlags = [
|
|
|
|
"-DUDEVDIR=\${out}/lib/udev/rules.d"
|
|
|
|
"-DCMAKE_MODULE_PATH=${libgaminggear.dev}/lib/cmake"
|
|
|
|
"-DWITH_LUA=${lua.luaversion}"
|
|
|
|
"-DLIBDIR=lib"
|
|
|
|
];
|
|
|
|
|
2022-06-05 19:31:39 +00:00
|
|
|
NIX_CFLAGS_COMPILE = [
|
|
|
|
"-I${harfbuzz.dev}/include/harfbuzz"
|
|
|
|
|
|
|
|
# Workaround build failure on -fno-common toolchains:
|
|
|
|
# ld: ryos_talk.c.o:(.bss+0x0): multiple definition of `RyosWriteCheckWait';
|
|
|
|
# ryos_custom_lights.c.o:(.bss+0x0): first defined here
|
|
|
|
"-fcommon"
|
|
|
|
];
|
2020-08-13 19:38:19 +00:00
|
|
|
|
2018-09-28 19:40:23 +00:00
|
|
|
meta = {
|
|
|
|
description = "Tools to configure ROCCAT devices";
|
2020-04-01 01:11:51 +00:00
|
|
|
homepage = "http://roccat.sourceforge.net/";
|
2021-01-15 14:45:37 +00:00
|
|
|
platforms = lib.platforms.linux;
|
|
|
|
license = lib.licenses.gpl2Plus;
|
2018-09-28 19:40:23 +00:00
|
|
|
};
|
|
|
|
}
|