-
-
Notifications
You must be signed in to change notification settings - Fork 14k
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
Package request: logiops #122208
Comments
I'm happy to try to package this myself, but I'm relatively new to writing Nix packages, so I might need some guidance. It would also be nice if there were nixos options for this package --- it has a systemd service and a configuration file. |
I'm interested, too. I got a Logitec mouse last week and I've been trying to get this to build: { pkgs ? import <nixpkgs> {} }:
with pkgs; stdenv.mkDerivation rec {
pname = "logiops";
version = "0.2.3";
src = fetchFromGitHub {
owner = "PixlOne";
repo = "logiops";
rev = "v${version}";
sha256 = "1wgv6m1kkxl0hppy8vmcj1237mr26ckfkaqznj1n6cy82vrgdznn";
};
nativeBuildInputs = [ cmake pkg-config ];
buildInputs = [ libevdev libudev libconfig ];
} is as far as I've gotten. When I try to build this it seems to compile just fine, but CMake tries to install the service file in a systemd directory, which isn't writeable. I don't know enough about how this ought to be handled to solve it myself. |
Actually, I've just figured out how to stop CMake from trying to install that file, need to apply this patch: diff --git i/src/logid/CMakeLists.txt w/src/logid/CMakeLists.txt
index 00ee796..c8300a5 100644
--- i/src/logid/CMakeLists.txt
+++ w/src/logid/CMakeLists.txt
@@ -96,10 +96,6 @@ if (SYSTEMD_FOUND AND "${SYSTEMD_SERVICES_INSTALL_DIR}" STREQUAL "")
string(REGEX REPLACE "[ \t\n]+" "" SYSTEMD_SERVICES_INSTALL_DIR
"${SYSTEMD_SERVICES_INSTALL_DIR}")
configure_file(logid.service.cmake ${CMAKE_BINARY_DIR}/logid.service)
- message(STATUS "systemd units will be installed at ${SYSTEMD_SERVICES_INSTALL_DIR}")
- install(FILES ${CMAKE_BINARY_DIR}/logid.service
- DESTINATION ${SYSTEMD_SERVICES_INSTALL_DIR}
- COMPONENT cp)
elseif(NOT SYSTEMD_FOUND AND SYSTEMD_SERVICES_INSTALL_DIR)
message(FATAL_ERROR "systemd is not found w/ pkg-config but SYSTEMD_SERVICES_INSTALL_DIR is defined.")
endif() |
I managed to get everything working, even wrote a NixOS module. But, I'm a noob at writing packages and modules, and I may need some hand-holding to get this to production-quality (e.g. right now all of the config for the I'll draft a proper PR for this in the next few days. |
I have a mostly working package for logiops on my machine, as well, also including a half-finished NixOS module. If you want to compare notes, let me know --- I'm also pretty new to packaging things for nix. |
FWIW, I started on defining the config in Nix, rather than a big string --- I could probably get it working fairly soon and we could add that to your change. |
Draft PR here: #124158 |
Package requested in NixOS#122208
Service definition for logiops, which was requested in NixOS#122208.
The module is basically done and I've been using it for 4 months now. Just need someone to review. |
Hello @hawkw 👋
(I'm going through issues marked as stale to see what can be resolved.) |
Project description
An unofficial driver for Logitech mice and keyboards.
This allows things like setting keymappings for the additional buttons on Logitech mice, changing DPI, etc.
Metadata
The text was updated successfully, but these errors were encountered: