mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-22 23:13:19 +00:00
Merge pull request #289701 from kylechui/feat/update-logiops
This commit is contained in:
commit
88ce13798f
56
pkgs/by-name/lo/logiops/package.nix
Normal file
56
pkgs/by-name/lo/logiops/package.nix
Normal file
@ -0,0 +1,56 @@
|
||||
{
|
||||
lib,
|
||||
stdenv,
|
||||
fetchFromGitHub,
|
||||
pkg-config,
|
||||
cmake,
|
||||
glib,
|
||||
udev,
|
||||
libevdev,
|
||||
libconfig,
|
||||
}:
|
||||
|
||||
stdenv.mkDerivation (oldAttrs: {
|
||||
pname = "logiops";
|
||||
version = "0.3.3";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "PixlOne";
|
||||
repo = "logiops";
|
||||
rev = "v${oldAttrs.version}";
|
||||
sha256 = "sha256-9nFTud5szQN8jpG0e/Bkp+I9ELldfo66SdfVCUTuekg=";
|
||||
# In v0.3.0, the `ipcgull` submodule was added as a dependency
|
||||
# https://github.com/PixlOne/logiops/releases/tag/v0.3.0
|
||||
fetchSubmodules = true;
|
||||
};
|
||||
|
||||
patches = [
|
||||
./pkgs0001-Make-DBUS_SYSTEM_POLICY_INSTALL_DIR-externally-overr.patch
|
||||
];
|
||||
|
||||
nativeBuildInputs = [
|
||||
cmake
|
||||
pkg-config
|
||||
];
|
||||
buildInputs = [
|
||||
udev
|
||||
libevdev
|
||||
libconfig
|
||||
glib
|
||||
];
|
||||
|
||||
cmakeFlags = [
|
||||
"-DLOGIOPS_VERSION=${oldAttrs.version}"
|
||||
"-DDBUS_SYSTEM_POLICY_INSTALL_DIR=${placeholder "out"}/share/dbus-1/system.d"
|
||||
];
|
||||
|
||||
PKG_CONFIG_SYSTEMD_SYSTEMDSYSTEMUNITDIR = "${placeholder "out"}/lib/systemd/system";
|
||||
|
||||
meta = with lib; {
|
||||
description = "Unofficial userspace driver for HID++ Logitech devices";
|
||||
homepage = "https://github.com/PixlOne/logiops";
|
||||
license = licenses.gpl3Plus;
|
||||
maintainers = with maintainers; [ ckie ];
|
||||
platforms = with platforms; linux;
|
||||
};
|
||||
})
|
@ -0,0 +1,30 @@
|
||||
From b7588376e20661c8d79e7472732244c70b8e7d3f Mon Sep 17 00:00:00 2001
|
||||
From: ckie <git-525ff67@ckie.dev>
|
||||
Date: Mon, 16 Oct 2023 02:02:38 +0300
|
||||
Subject: [PATCH] Make DBUS_SYSTEM_POLICY_INSTALL_DIR externally overrideable
|
||||
|
||||
---
|
||||
src/logid/CMakeLists.txt | 6 ++++--
|
||||
1 file changed, 4 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/src/logid/CMakeLists.txt b/src/logid/CMakeLists.txt
|
||||
index b2616c8..58d6719 100644
|
||||
--- a/src/logid/CMakeLists.txt
|
||||
+++ b/src/logid/CMakeLists.txt
|
||||
@@ -111,9 +111,11 @@ elseif (NOT SYSTEMD_FOUND AND SYSTEMD_SERVICES_INSTALL_DIR)
|
||||
endif ()
|
||||
|
||||
# Install DBus conf
|
||||
-# TODO: Is there a better way of setting the system policy directory?
|
||||
-set(DBUS_SYSTEM_POLICY_INSTALL_DIR "/usr/share/dbus-1/system.d")
|
||||
configure_file(logiops-dbus.conf.in ${CMAKE_BINARY_DIR}/pizza.pixl.LogiOps.conf)
|
||||
+if (NOT DEFINED DBUS_SYSTEM_POLICY_INSTALL_DIR)
|
||||
+ # TODO: Is there a better way of setting the system policy directory?
|
||||
+ set(DBUS_SYSTEM_POLICY_INSTALL_DIR "/usr/share/dbus-1/system.d")
|
||||
+endif ()
|
||||
message(STATUS "dbus system policy will be installed at ${DBUS_SYSTEM_POLICY_INSTALL_DIR}")
|
||||
install(FILES ${CMAKE_BINARY_DIR}/pizza.pixl.LogiOps.conf
|
||||
DESTINATION ${DBUS_SYSTEM_POLICY_INSTALL_DIR}
|
||||
--
|
||||
2.42.0
|
||||
|
@ -29367,8 +29367,6 @@ with pkgs;
|
||||
|
||||
lmodern = callPackage ../data/fonts/lmodern { };
|
||||
|
||||
logiops = callPackage ../misc/drivers/logiops { };
|
||||
|
||||
# ltunifi and solaar both provide udev rules but solaar's rules are more
|
||||
# up-to-date so we simply use that instead of having to maintain our own rules
|
||||
logitech-udev-rules = solaar.udev;
|
||||
|
Loading…
Reference in New Issue
Block a user