Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions maintainers/maintainer-list.nix
Original file line number Diff line number Diff line change
Expand Up @@ -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";
Expand Down
1 change: 1 addition & 0 deletions nixos/modules/module-list.nix
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
32 changes: 32 additions & 0 deletions nixos/modules/services/hardware/ratbagd.nix
Original file line number Diff line number Diff line change
@@ -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 ];
};
}
36 changes: 36 additions & 0 deletions pkgs/os-specific/linux/libratbag/default.nix
Original file line number Diff line number Diff line change
@@ -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;
};
}
33 changes: 33 additions & 0 deletions pkgs/os-specific/linux/piper/default.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
{ stdenv, meson, ninja, pkgconfig, gettext, fetchFromGitHub, python3
, wrapGAppsHook, gtk3, glib, desktop-file-utils, appstream-glib, gnome3 }:

python3.pkgs.buildPythonApplication rec {
pname = "piper-${version}";
version = "0.2.902";

format = "other";

src = fetchFromGitHub {
owner = "libratbag";
repo = "piper";
rev = version;
sha256 = "1ny0vf8ym9v040cb5h084k5wwn929fnhq9infbdq8f8vvy61magb";
};

nativeBuildInputs = [ meson ninja gettext pkgconfig wrapGAppsHook desktop-file-utils appstream-glib ];
buildInputs = [ gtk3 glib gnome3.defaultIconTheme python3 ];
propagatedBuildInputs = with python3.pkgs; [ lxml evdev pygobject3 ];

postPatch = ''
chmod +x meson_install.sh # patchShebangs requires executable file
patchShebangs meson_install.sh
'';

meta = with stdenv.lib; {
description = "GTK frontend for ratbagd mouse config daemon";
homepage = https://github.com/libratbag/piper;
license = licenses.gpl2;
maintainers = with maintainers; [ mvnetbiz ];
platforms = platforms.linux;
};
}
4 changes: 4 additions & 0 deletions pkgs/top-level/all-packages.nix
Original file line number Diff line number Diff line change
Expand Up @@ -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 { };
Expand Down Expand Up @@ -17744,6 +17746,8 @@ with pkgs;

pijul = callPackage ../applications/version-management/pijul {};

piper = callPackage ../os-specific/linux/piper { };

plank = callPackage ../applications/misc/plank { };

planner = callPackage ../applications/office/planner { };
Expand Down