Unverified Commit 94633f04 authored by Artturi's avatar Artturi Committed by GitHub
Browse files

Merge pull request #257386 from RaySlash/hid-tmff2

parents c2b5a5e7 546fc203
Loading
Loading
Loading
Loading
+6 −0
Original line number Diff line number Diff line
@@ -14841,6 +14841,12 @@
    githubId = 145816;
    name = "David McKay";
  };
  rayslash = {
    email = "stevemathewjoy@tutanota.com";
    github = "rayslash";
    githubId = 45141270;
    name = "Steve Mathew Joy";
  };
  razvan = {
    email = "razvan.panda@gmail.com";
    github = "freeman42x";
+36 −0
Original line number Diff line number Diff line
{ 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;
  };
}
+2 −0
Original line number Diff line number Diff line
@@ -565,6 +565,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