Skip to content

Commit

Permalink
logiops: init at 0.2.3
Browse files Browse the repository at this point in the history
Package requested in NixOS#122208
  • Loading branch information
zeorin committed May 23, 2021
1 parent d472218 commit 92d54d2
Show file tree
Hide file tree
Showing 3 changed files with 62 additions and 0 deletions.
45 changes: 45 additions & 0 deletions pkgs/tools/inputmethods/logiops/default.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
{ lib
, stdenv
, fetchFromGitHub
, cmake
, pkg-config
, libevdev
, libudev
, libconfig
}:

stdenv.mkDerivation rec {
pname = "logiops";
version = "0.2.3";

src = fetchFromGitHub {
owner = "PixlOne";
repo = "logiops";
rev = "v${version}";
sha256 = "1wgv6m1kkxl0hppy8vmcj1237mr26ckfkaqznj1n6cy82vrgdznn";
};

patches = [ ./logiops-no-systemd-service.patch ];

nativeBuildInputs = [ cmake pkg-config ];

buildInputs = [ libevdev libudev libconfig ];

meta = with lib; {
description = "An unofficial userspace driver for HID++ Logitech mice and keyboards";
longDescription = ''
Logiops is an unofficial userspace driver for HID++ Logitech mice and keyboards.
It can configure features like: easy programmable buttons, DPI selection,
Smartshift (hyperfast and click-to-click wheel mode), HiresScroll, gestures.
It is meant to run as a service, see `services.logiops`.
Currently only compatible with HID++ >2.0 devices.
'';
license = licenses.gpl3;
homepage = "https://github.com/PixlOne/logiops";
platforms = platforms.linux;
maintainers = with maintainers; [ zeorin ];
};
}
15 changes: 15 additions & 0 deletions pkgs/tools/inputmethods/logiops/logiops-no-systemd-service.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
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()
2 changes: 2 additions & 0 deletions pkgs/top-level/all-packages.nix
Original file line number Diff line number Diff line change
Expand Up @@ -6157,6 +6157,8 @@ in

lockfileProgs = callPackage ../tools/misc/lockfile-progs { };

logiops = callPackage ../tools/inputmethods/logiops { };

logstash6 = callPackage ../tools/misc/logstash/6.x.nix {
# https://www.elastic.co/support/matrix#logstash-and-jvm
jre = jdk11_headless;
Expand Down

0 comments on commit 92d54d2

Please sign in to comment.