From e9300aa12c9c18c1214df84ca50ba9b41b2f165f Mon Sep 17 00:00:00 2001 From: aszlig Date: Fri, 28 Sep 2018 21:39:50 +0200 Subject: [PATCH 1/2] libgaminggear: init at 0.15.1 This is a requirement for roccat-tools, which is going to be introduced soon. The reason why I'm using propagatedBuildInputs here is because the pkg-config file lists *all* of the dependencies in Requires and Requires.private, so those libraries are needed whenever any software uses that library. Signed-off-by: aszlig --- .../libraries/libgaminggear/default.nix | 40 +++++++++++++++++++ pkgs/top-level/all-packages.nix | 2 + 2 files changed, 42 insertions(+) create mode 100644 pkgs/development/libraries/libgaminggear/default.nix diff --git a/pkgs/development/libraries/libgaminggear/default.nix b/pkgs/development/libraries/libgaminggear/default.nix new file mode 100644 index 00000000000..a6fe2bc1435 --- /dev/null +++ b/pkgs/development/libraries/libgaminggear/default.nix @@ -0,0 +1,40 @@ +{ stdenv, fetchurl, cmake, pkgconfig, gettext +, gtk2, libcanberra, libnotify, pcre, sqlite, xorg +}: + +stdenv.mkDerivation rec { + name = "libgaminggear-${version}"; + version = "0.15.1"; + + src = fetchurl { + url = "mirror://sourceforge/libgaminggear/${name}.tar.bz2"; + sha256 = "0jf5i1iv8j842imgiixbhwcr6qcwa93m27lzr6gb01ri5v35kggz"; + }; + + outputs = [ "dev" "out" "bin" ]; + + nativeBuildInputs = [ cmake pkgconfig gettext ]; + + propagatedBuildInputs = [ + gtk2 libcanberra libnotify pcre sqlite xorg.libXdmcp xorg.libpthreadstubs + ]; + + enableParallelBuilding = true; + + cmakeFlags = [ + "-DINSTALL_CMAKE_MODULESDIR=lib/cmake" + "-DINSTALL_PKGCONFIGDIR=lib/pkgconfig" + "-DINSTALL_LIBDIR=lib" + ]; + + postFixup = '' + moveToOutput bin "$bin" + ''; + + meta = { + description = "Provides functionality for gaming input devices"; + homepage = https://sourceforge.net/projects/libgaminggear/; + 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 3b8b440e6bb..68a98ba5e72 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -3781,6 +3781,8 @@ with pkgs; libfann = callPackage ../development/libraries/libfann { }; + libgaminggear = callPackage ../development/libraries/libgaminggear { }; + libipfix = callPackage ../development/libraries/libipfix { }; libircclient = callPackage ../development/libraries/libircclient { }; From c502dd8a5b8af017007adddf73e614fc7bfbbe51 Mon Sep 17 00:00:00 2001 From: aszlig Date: Fri, 28 Sep 2018 21:40:23 +0200 Subject: [PATCH 2/2] 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 Cc: @devhell --- .../linux/roccat-tools/default.nix | 41 +++++++++++++++++++ pkgs/top-level/all-packages.nix | 2 + 2 files changed, 43 insertions(+) create mode 100644 pkgs/os-specific/linux/roccat-tools/default.nix 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; + }; +} diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 68a98ba5e72..65fdd745e4d 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 { };