libratbag: init at v0.9.903

Add package libratbag and service module ratbagd
Libratbag contains ratbagd daemon and ratbagctl cli to configure
buttons, dpi, leds, etc. of gaming mice.
Add mvnetbiz to maintainers.
This commit is contained in:
Matt Votava 2018-09-21 02:13:49 -07:00
parent aba0fe5d62
commit 9a859fb7f9
5 changed files with 76 additions and 0 deletions

View File

@ -2808,6 +2808,11 @@
github = "muflax";
name = "Stefan Dorn";
};
mvnetbiz = {
email = "mvnetbiz@gmail.com";
github = "mvnetbiz";
name = "Matt Votava";
};
myrl = {
email = "myrl.0xf@gmail.com";
github = "myrl";

View File

@ -275,6 +275,7 @@
./services/hardware/nvidia-optimus.nix
./services/hardware/pcscd.nix
./services/hardware/pommed.nix
./services/hardware/ratbagd.nix
./services/hardware/sane.nix
./services/hardware/sane_extra_backends/brscan4.nix
./services/hardware/tcsd.nix

View File

@ -0,0 +1,32 @@
{ config, lib, pkgs, ... }:
with lib;
let
cfg = config.services.ratbagd;
in
{
###### interface
options = {
services.ratbagd = {
enable = mkOption {
default = false;
description = ''
Whether to enable ratbagd for configuring gaming mice.
'';
};
};
};
###### implementation
config = mkIf cfg.enable {
# Give users access to the "ratbagctl" tool
environment.systemPackages = [ pkgs.libratbag ];
services.dbus.packages = [ pkgs.libratbag ];
systemd.packages = [ pkgs.libratbag ];
};
}

View File

@ -0,0 +1,36 @@
{ stdenv, fetchFromGitHub, meson, ninja, pkgconfig
, glib, systemd, udev, libevdev, gitMinimal, check, valgrind, swig, python3 }:
stdenv.mkDerivation rec {
name = "libratbag-${version}";
version = "0.9.903";
src = fetchFromGitHub {
owner = "libratbag";
repo = "libratbag";
rev = "v${version}";
sha256 = "0cr5skrb7a5mgj7dkm647ib8336hb88bf11blaf6xldafi8b0jlj";
};
# todo: python should be in buildInputs, but right now meson propagates
# its own python. see: https://github.com/NixOS/nixpkgs/pull/46020
nativeBuildInputs = [
(python3.withPackages (ps: with ps; [ evdev pygobject3 ]))
meson ninja pkgconfig gitMinimal swig check valgrind
];
buildInputs = [ glib systemd udev libevdev ];
mesonFlags = [
"-Dsystemd-unit-dir=./lib/systemd/system/"
];
meta = with stdenv.lib; {
description = "Configuration library for gaming mice";
homepage = https://github.com/libratbag/libratbag;
license = licenses.mit;
maintainers = with maintainers; [ mvnetbiz ];
platforms = platforms.linux;
};
}

View File

@ -15022,6 +15022,8 @@ with pkgs;
libertinus = callPackage ../data/fonts/libertinus { };
libratbag = callPackage ../os-specific/linux/libratbag { };
libre-baskerville = callPackage ../data/fonts/libre-baskerville { };
libre-bodoni = callPackage ../data/fonts/libre-bodoni { };