Merge pull request #46274 from mvnetbiz/libratbag
libratbag: init at v0.9.903
This commit is contained in:
commit
93408aecc4
@ -2813,6 +2813,11 @@
|
||||
github = "muflax";
|
||||
name = "Stefan Dorn";
|
||||
};
|
||||
mvnetbiz = {
|
||||
email = "mvnetbiz@gmail.com";
|
||||
github = "mvnetbiz";
|
||||
name = "Matt Votava";
|
||||
};
|
||||
myrl = {
|
||||
email = "myrl.0xf@gmail.com";
|
||||
github = "myrl";
|
||||
|
@ -276,6 +276,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
|
||||
|
32
nixos/modules/services/hardware/ratbagd.nix
Normal file
32
nixos/modules/services/hardware/ratbagd.nix
Normal 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 ];
|
||||
};
|
||||
}
|
36
pkgs/os-specific/linux/libratbag/default.nix
Normal file
36
pkgs/os-specific/linux/libratbag/default.nix
Normal 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;
|
||||
};
|
||||
}
|
33
pkgs/os-specific/linux/piper/default.nix
Normal file
33
pkgs/os-specific/linux/piper/default.nix
Normal file
@ -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;
|
||||
};
|
||||
}
|
@ -15064,6 +15064,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 { };
|
||||
@ -17791,6 +17793,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 { };
|
||||
|
Loading…
Reference in New Issue
Block a user