new-lg4ff: init at 0.3.3
This commit is contained in:
28
nixos/modules/hardware/new-lg4ff.nix
Normal file
28
nixos/modules/hardware/new-lg4ff.nix
Normal file
@@ -0,0 +1,28 @@
|
|||||||
|
{ pkgs, lib, config, ... }:
|
||||||
|
|
||||||
|
with lib;
|
||||||
|
|
||||||
|
let
|
||||||
|
cfg = config.hardware.new-lg4ff;
|
||||||
|
in {
|
||||||
|
options.hardware.new-lg4ff = {
|
||||||
|
enable = mkOption {
|
||||||
|
type = types.bool;
|
||||||
|
default = false;
|
||||||
|
description = ''
|
||||||
|
Enables improved Linux module drivers for Logitech driving wheels.
|
||||||
|
This will replace the existing in-kernel hid-logitech modules.
|
||||||
|
Works most notably on the Logitech G25, G27, G29 and Driving Force (GT).
|
||||||
|
'';
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
config = {
|
||||||
|
boot = {
|
||||||
|
extraModulePackages = [ pkgs.new-lg4ff ];
|
||||||
|
kernelModules = [ "hid-logitech-new" ];
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
meta.maintainers = with lib.maintainers; [ matthiasbenaets ];
|
||||||
|
}
|
||||||
@@ -66,6 +66,7 @@
|
|||||||
./hardware/network/ath-user-regd.nix
|
./hardware/network/ath-user-regd.nix
|
||||||
./hardware/network/b43.nix
|
./hardware/network/b43.nix
|
||||||
./hardware/network/intel-2200bg.nix
|
./hardware/network/intel-2200bg.nix
|
||||||
|
./hardware/new-lg4ff.nix
|
||||||
./hardware/nitrokey.nix
|
./hardware/nitrokey.nix
|
||||||
./hardware/opengl.nix
|
./hardware/opengl.nix
|
||||||
./hardware/openrazer.nix
|
./hardware/openrazer.nix
|
||||||
|
|||||||
36
pkgs/os-specific/linux/new-lg4ff/default.nix
Normal file
36
pkgs/os-specific/linux/new-lg4ff/default.nix
Normal file
@@ -0,0 +1,36 @@
|
|||||||
|
{ lib, stdenv, kernel, fetchFromGitHub }:
|
||||||
|
|
||||||
|
stdenv.mkDerivation rec {
|
||||||
|
pname = "new-lg4ff";
|
||||||
|
version = "0.3.3";
|
||||||
|
|
||||||
|
src = fetchFromGitHub {
|
||||||
|
owner = "berarma";
|
||||||
|
repo = "new-lg4ff";
|
||||||
|
rev = "${version}";
|
||||||
|
sha256 = "+05xDpNI4m6wTS+YPgA0fP4iM10nMOZOtCrdQxpevBU=";
|
||||||
|
};
|
||||||
|
|
||||||
|
preBuild = ''
|
||||||
|
substituteInPlace Makefile --replace "modules_install" "INSTALL_MOD_PATH=$out modules_install"
|
||||||
|
sed -i '/depmod/d' Makefile
|
||||||
|
sed -i "10i\\\trmmod hid-logitech 2> /dev/null || true" Makefile
|
||||||
|
sed -i "11i\\\trmmod hid-logitech-new 2> /dev/null || true" Makefile
|
||||||
|
'';
|
||||||
|
|
||||||
|
nativeBuildInputs = kernel.moduleBuildDependencies;
|
||||||
|
|
||||||
|
makeFlags = [
|
||||||
|
"KVERSION=${kernel.modDirVersion}"
|
||||||
|
"KDIR=${kernel.dev}/lib/modules/${kernel.modDirVersion}/build"
|
||||||
|
];
|
||||||
|
|
||||||
|
meta = with lib; {
|
||||||
|
description = "Experimental Logitech force feedback module for Linux";
|
||||||
|
homepage = "https://github.com/berarma/new-lg4ff";
|
||||||
|
license = licenses.gpl2Only;
|
||||||
|
maintainers = with maintainers; [ matthiasbenaets ];
|
||||||
|
platforms = platforms.linux;
|
||||||
|
broken = stdenv.isAarch64;
|
||||||
|
};
|
||||||
|
}
|
||||||
@@ -23057,6 +23057,10 @@ with pkgs;
|
|||||||
stdenv = gcc11Stdenv;
|
stdenv = gcc11Stdenv;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
new-lg4ff = callPackage ../os-specific/linux/new-lg4ff {
|
||||||
|
inherit (linuxPackages) kernel;
|
||||||
|
};
|
||||||
|
|
||||||
nmon = callPackage ../os-specific/linux/nmon { };
|
nmon = callPackage ../os-specific/linux/nmon { };
|
||||||
|
|
||||||
hwdata = callPackage ../os-specific/linux/hwdata { };
|
hwdata = callPackage ../os-specific/linux/hwdata { };
|
||||||
|
|||||||
Reference in New Issue
Block a user