From b825086d3d3b93fc5042b9a3d17418fd1980336c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?P=C5=99emysl=20Eric=20Janouch?= Date: Fri, 30 Jun 2023 02:36:21 +0200 Subject: [PATCH] Add sensei-raw-ctl The GUI might not work, as it might require some kind of integration with polkit. --- sensei-raw-ctl-master.nix | 57 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 57 insertions(+) create mode 100644 sensei-raw-ctl-master.nix diff --git a/sensei-raw-ctl-master.nix b/sensei-raw-ctl-master.nix new file mode 100644 index 0000000..d861d0c --- /dev/null +++ b/sensei-raw-ctl-master.nix @@ -0,0 +1,57 @@ +{ pkgs ? import { } +, local ? false +, full ? true +}: +pkgs.stdenv.mkDerivation rec { + pname = "sensei-raw-ctl"; + version = "master"; + + nativeBuildInputs = with pkgs; [ + cmake + pkg-config + help2man + ]; + + buildInputs = with pkgs; [ + libusb + ] ++ lib.optionals full [ + gtk3 + + # To address pkg-config warnings, all the way down. + libthai + pcre2 + libdatrie + libepoxy + ] ++ lib.optionals (full && !stdenv.isDarwin) [ + libxkbcommon + xorg.libXdmcp + xorg.libXtst + ] ++ lib.optionals (full && stdenv.isLinux) [ + util-linux + libselinux + libsepol + pcre + ]; + + src = if local then + builtins.path { + path = ../${pname}/git; + name = "${pname}"; + } + else + fetchGit { + url = "https://git.janouch.name/p/${pname}.git"; + submodules = true; + ref = "master"; + }; + + doCheck = true; + + meta = with pkgs.lib; { + description = "SteelSeries Sensei Raw control utility"; + homepage = "https://git.janouch.name/p/${pname}"; + platforms = platforms.all; + license = licenses.bsd0; + }; +} +