git.iko.soy/typeable/nixpkgs
on master help sign in
Merge pull request #46274 from mvnetbiz/libratbag

libratbag: init at v0.9.903

commit93408aecc4accc158293222ccbbfe15283da70e0 authorJan Tojnar <jtojnar@gmail.com> dateFri 21 Sep 2018, 22:49 (8 years ago) parent3748c2578f1715
6 files changed+111
maintainers/maintainer-list.nix+5 nixos/modules/module-list.nix+1 nixos/modules/services/hardware/ratbagd.nix+32 pkgs/os-specific/linux/libratbag/default.nix+36 pkgs/os-specific/linux/piper/default.nix+33 pkgs/top-level/all-packages.nix+4
maintainers/maintainer-list.nix+5
@@ -2813,6 +2813,11 @@
28132813 github = "muflax";
28142814 name = "Stefan Dorn";
28152815 };
2816+ mvnetbiz = {
2817+ email = "mvnetbiz@gmail.com";
2818+ github = "mvnetbiz";
2819+ name = "Matt Votava";
2820+ };
28162821 myrl = {
28172822 email = "myrl.0xf@gmail.com";
28182823 github = "myrl";
nixos/modules/module-list.nix+1
@@ -276,6 +276,7 @@
276276 ./services/hardware/nvidia-optimus.nix
277277 ./services/hardware/pcscd.nix
278278 ./services/hardware/pommed.nix
279+ ./services/hardware/ratbagd.nix
279280 ./services/hardware/sane.nix
280281 ./services/hardware/sane_extra_backends/brscan4.nix
281282 ./services/hardware/tcsd.nix
nixos/modules/services/hardware/ratbagd.nixnew file+32
@@ -0,0 +1,32 @@
1+{ config, lib, pkgs, ... }:
2+
3+with lib;
4+
5+let
6+ cfg = config.services.ratbagd;
7+in
8+{
9+ ###### interface
10+
11+ options = {
12+ services.ratbagd = {
13+ enable = mkOption {
14+ default = false;
15+ description = ''
16+ Whether to enable ratbagd for configuring gaming mice.
17+ '';
18+ };
19+ };
20+ };
21+
22+ ###### implementation
23+
24+ config = mkIf cfg.enable {
25+ # Give users access to the "ratbagctl" tool
26+ environment.systemPackages = [ pkgs.libratbag ];
27+
28+ services.dbus.packages = [ pkgs.libratbag ];
29+
30+ systemd.packages = [ pkgs.libratbag ];
31+ };
32+}
pkgs/os-specific/linux/libratbag/default.nixnew file+36
@@ -0,0 +1,36 @@
1+{ stdenv, fetchFromGitHub, meson, ninja, pkgconfig
2+, glib, systemd, udev, libevdev, gitMinimal, check, valgrind, swig, python3 }:
3+
4+stdenv.mkDerivation rec {
5+ name = "libratbag-${version}";
6+ version = "0.9.903";
7+
8+ src = fetchFromGitHub {
9+ owner = "libratbag";
10+ repo = "libratbag";
11+ rev = "v${version}";
12+ sha256 = "0cr5skrb7a5mgj7dkm647ib8336hb88bf11blaf6xldafi8b0jlj";
13+ };
14+
15+
16+ # todo: python should be in buildInputs, but right now meson propagates
17+ # its own python. see: https://github.com/NixOS/nixpkgs/pull/46020
18+ nativeBuildInputs = [
19+ (python3.withPackages (ps: with ps; [ evdev pygobject3 ]))
20+ meson ninja pkgconfig gitMinimal swig check valgrind
21+ ];
22+
23+ buildInputs = [ glib systemd udev libevdev ];
24+
25+ mesonFlags = [
26+ "-Dsystemd-unit-dir=./lib/systemd/system/"
27+ ];
28+
29+ meta = with stdenv.lib; {
30+ description = "Configuration library for gaming mice";
31+ homepage = https://github.com/libratbag/libratbag;
32+ license = licenses.mit;
33+ maintainers = with maintainers; [ mvnetbiz ];
34+ platforms = platforms.linux;
35+ };
36+}
pkgs/os-specific/linux/piper/default.nixnew file+33
@@ -0,0 +1,33 @@
1+{ stdenv, meson, ninja, pkgconfig, gettext, fetchFromGitHub, python3
2+, wrapGAppsHook, gtk3, glib, desktop-file-utils, appstream-glib, gnome3 }:
3+
4+python3.pkgs.buildPythonApplication rec {
5+ pname = "piper-${version}";
6+ version = "0.2.902";
7+
8+ format = "other";
9+
10+ src = fetchFromGitHub {
11+ owner = "libratbag";
12+ repo = "piper";
13+ rev = version;
14+ sha256 = "1ny0vf8ym9v040cb5h084k5wwn929fnhq9infbdq8f8vvy61magb";
15+ };
16+
17+ nativeBuildInputs = [ meson ninja gettext pkgconfig wrapGAppsHook desktop-file-utils appstream-glib ];
18+ buildInputs = [ gtk3 glib gnome3.defaultIconTheme python3 ];
19+ propagatedBuildInputs = with python3.pkgs; [ lxml evdev pygobject3 ];
20+
21+ postPatch = ''
22+ chmod +x meson_install.sh # patchShebangs requires executable file
23+ patchShebangs meson_install.sh
24+ '';
25+
26+ meta = with stdenv.lib; {
27+ description = "GTK frontend for ratbagd mouse config daemon";
28+ homepage = https://github.com/libratbag/piper;
29+ license = licenses.gpl2;
30+ maintainers = with maintainers; [ mvnetbiz ];
31+ platforms = platforms.linux;
32+ };
33+}
pkgs/top-level/all-packages.nix+4
@@ -15064,6 +15064,8 @@ with pkgs;
1506415064
1506515065 libertinus = callPackage ../data/fonts/libertinus { };
1506615066
15067+ libratbag = callPackage ../os-specific/linux/libratbag { };
15068+
1506715069 libre-baskerville = callPackage ../data/fonts/libre-baskerville { };
1506815070
1506915071 libre-bodoni = callPackage ../data/fonts/libre-bodoni { };
@@ -17791,6 +17793,8 @@ with pkgs;
1779117793
1779217794 pijul = callPackage ../applications/version-management/pijul {};
1779317795
17796+ piper = callPackage ../os-specific/linux/piper { };
17797+
1779417798 plank = callPackage ../applications/misc/plank { };
1779517799
1779617800 planner = callPackage ../applications/office/planner { };