depot/third_party/nixpkgs/pkgs/os-specific/linux/new-lg4ff/default.nix
Default email 3a4df29a92 Project import generated by Copybara.
GitOrigin-RevId: 3d7435c638baffaa826b85459df0fff47f12317d
2022-06-16 19:23:12 +02:00

36 lines
1 KiB
Nix

{ 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;
};
}