-
-
Notifications
You must be signed in to change notification settings - Fork 14.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
libratbag: init at v0.9.903 #46274
libratbag: init at v0.9.903 #46274
Conversation
See also #35516 |
}; | ||
|
||
nativeBuildInputs = [ | ||
(python3.withPackages (ps: with ps; [ evdev pygobject3 ])) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This should be moved to buildInputs
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If this is moved to buildInputs
, the patch shebangs for "ratbagctl" gives the wrong python, and program fails because it can't import the right modules. This seemed like the wrong place to put it based on nixos manual's description of the different build inputs, but I am not sure how to get around that.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
# Give users access to the "ratbagctl" tool | ||
environment.systemPackages = [ pkgs.libratbag ]; | ||
|
||
systemd.services.ratbagd = { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You should be able to use systemd.packages = [ pkgs.libratbag ];
I've included your suggestions, thanks. |
environment.systemPackages = [ pkgs.libratbag ]; | ||
|
||
systemd.packages = [ pkgs.libratbag ]; | ||
systemd.services.ratbagd = { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why did you keep this? It should already be specified in the service file in the package, which is installed by the systemd.packages
option.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I couldn't figure out of that actually used the packages own unit file. It didn't seem to work for me when I removed my own definition. Is there a way to point it to where the build outputs it?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It does, only the servcie file does not have wantedBy
. You can do systemd.services.ratbagd.wantedBy = [ "multi-user.target" ];
, which will add the key to the override.
I wonder why the upstream service does not have that, though – maybe the daemon is supposed to be launched using a different method.
Do you plan to package piper as well? It would be nice to have some app to test if this is working. |
I was going to do that too. Would that be a separate PR? Libratbag package does have a command line that I have tested with my Logitech G403. |
For closely related packages like this, a single PR is fine. |
I was looking at packaging piper and got stuck on something. The piper application is a python script that includes a import like "import piper.application" in itself. Since meson propagates the python from the nativebuildinputs into this piper script, the python env it runs in does not include the piper package. |
I am aware of the issue and it will be fixed in the next meson release (#46020). At the moment we try to fix this by adding |
Pushed my expression for piper |
I patched out 2 lines from meson.build. One is it can't verify python gobject is installed. This must have something to do with pkg-config? I don't know how any of that works. And the other line includes a script that does something with gtk-update-icon-cache which fails. I think we don't need icon cache in the store anyways? |
Yep, only packages listed in build inputs get added to the Right, nixpkgs/pkgs/desktops/gnome-3/apps/gnome-calendar/default.nix Lines 29 to 32 in 874b045
|
Ok I've fixed up piper, using the python builder now. It works with my logitech mouse. |
Is there anything else I need to do? Should I squash commits or anything? |
Each package should be in a separate commit; other than that, it looks good. |
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.
Add package piper. Piper is a gtk frontend application for ratbagctl to configure gaming mice.
Ok thanks. I have split the commits and updated the PR description to include piper. |
Thank you. |
Motivation for this change
Libratbag is a daemon and utility for configuring DPI, buttons, etc. of programmable gaming mice.
Things done
Added package for libratbag and service module ratbagd.
Added piper: gtk frontend app for ratbagctl
sandbox
innix.conf
on non-NixOS)nix-shell -p nox --run "nox-review wip"
./result/bin/
)nix path-info -S
before and after)