mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-22 06:53:01 +00:00
logiops: 0.2.3 -> 0.3.3
feat: Add multiple version support. refactor: Remove unnecessary code. The `DBus` handling is already done via the changed patch file. chore: Fix formatting. refactor: Remove confusing comment. refactor: Abide by `by-name` CI. https://github.com/NixOS/nixpkgs/actions/runs/7968015723/job/21751618054?pr=289701 fix: Remove unnecessary CMake build flag. Nixpkgs already always builds Release, so this is redundant.
This commit is contained in:
parent
80c0fa7478
commit
5533f8b718
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
|
||||||
|
|
@ -29407,8 +29407,6 @@ with pkgs;
|
|||||||
|
|
||||||
lmodern = callPackage ../data/fonts/lmodern { };
|
lmodern = callPackage ../data/fonts/lmodern { };
|
||||||
|
|
||||||
logiops = callPackage ../misc/drivers/logiops { };
|
|
||||||
|
|
||||||
# ltunifi and solaar both provide udev rules but solaar's rules are more
|
# 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
|
# up-to-date so we simply use that instead of having to maintain our own rules
|
||||||
logitech-udev-rules = solaar.udev;
|
logitech-udev-rules = solaar.udev;
|
||||||
|
Loading…
Reference in New Issue
Block a user