diff options
Diffstat (limited to 'pkgs')
-rw-r--r-- | pkgs/os-specific/linux/hid-tmff2/default.nix | 36 | ||||
-rw-r--r-- | pkgs/top-level/linux-kernels.nix | 2 |
2 files changed, 38 insertions, 0 deletions
diff --git a/pkgs/os-specific/linux/hid-tmff2/default.nix b/pkgs/os-specific/linux/hid-tmff2/default.nix new file mode 100644 index 0000000000000..ac297c78e10e4 --- /dev/null +++ b/pkgs/os-specific/linux/hid-tmff2/default.nix @@ -0,0 +1,36 @@ +{ stdenv, lib, fetchFromGitHub, kernel }: + +stdenv.mkDerivation { + pname = "hid-tmff2"; + # https://github.com/Kimplul/hid-tmff2/blob/ca168637fbfb085ebc9ade0c47fa0653dac5d25b/dkms/dkms-install.sh#L12 + version = "0.81"; + + src = fetchFromGitHub { + owner = "Kimplul"; + repo = "hid-tmff2"; + rev = "ca168637fbfb085ebc9ade0c47fa0653dac5d25b"; + hash = "sha256-Nm5m5xjwJGy+ia4nTkvPZynIxUj6MVGGbSNmIcIpziM="; + # For hid-tminit. Source: https://github.com/scarburato/hid-tminit + fetchSubmodules = true; + }; + + nativeBuildInputs = kernel.moduleBuildDependencies; + + makeFlags = kernel.makeFlags ++ [ + "KDIR=${kernel.dev}/lib/modules/${kernel.modDirVersion}/build" + ]; + + installFlags = [ + "INSTALL_MOD_PATH=${placeholder "out"}" + ]; + + postPatch = "sed -i '/depmod -A/d' Makefile"; + + meta = with lib; { + description = "A linux kernel module for Thrustmaster T300RS, T248 and TX(experimental)"; + homepage = "https://github.com/Kimplul/hid-tmff2"; + license = licenses.gpl2Plus; + maintainers = [ maintainers.rayslash ]; + platforms = platforms.linux; + }; +} diff --git a/pkgs/top-level/linux-kernels.nix b/pkgs/top-level/linux-kernels.nix index 7b746286f055b..584fece9fbeeb 100644 --- a/pkgs/top-level/linux-kernels.nix +++ b/pkgs/top-level/linux-kernels.nix @@ -583,6 +583,8 @@ in { hid-ite8291r3 = callPackage ../os-specific/linux/hid-ite8291r3 { }; + hid-tmff2 = callPackage ../os-specific/linux/hid-tmff2 { }; + } // lib.optionalAttrs config.allowAliases { ati_drivers_x11 = throw "ati drivers are no longer supported by any kernel >=4.1"; # added 2021-05-18; hid-nintendo = throw "hid-nintendo was added in mainline kernel version 5.16"; # Added 2023-07-30 |