summary refs log tree commit diff
path: root/pkgs/os-specific/linux
diff options
context:
space:
mode:
authorRaySlash <stevemathewjoy@gmail.com>2023-09-26 14:10:21 +1000
committerRaySlash <stevemathewjoy@gmail.com>2023-11-10 21:12:42 +1000
commit546fc20314e70669836d049cf2339d6aed1dee71 (patch)
tree4d33506dde2701e63a1994a399b0575f6a0ef768 /pkgs/os-specific/linux
parentc0da39e7bb6d4f326c5ed07e76883c57dfe3fad4 (diff)
downloadnixpkgs-546fc20314e70669836d049cf2339d6aed1dee71.tar
nixpkgs-546fc20314e70669836d049cf2339d6aed1dee71.tar.gz
nixpkgs-546fc20314e70669836d049cf2339d6aed1dee71.tar.bz2
nixpkgs-546fc20314e70669836d049cf2339d6aed1dee71.tar.lz
nixpkgs-546fc20314e70669836d049cf2339d6aed1dee71.tar.xz
nixpkgs-546fc20314e70669836d049cf2339d6aed1dee71.tar.zst
nixpkgs-546fc20314e70669836d049cf2339d6aed1dee71.zip
hid-tmff2: init at v0.81
A linux module for Thrustmaste T300RS, T248 and TX(experimental) wheels.
https://github.com/Kimplul/hid-tmff2/commit/ca168637fbfb085ebc9ade0c47fa0653dac5d25b

- Additionally, https://github.com/scarburato/hid-tminit is also required
for proper init of the driver.

- The driver has been updated to v0.81

- Fixed a typo in maintainer-list

- hid-tmff2 update sha256

- update hid-tmff2 version

Co-authored-by: Artturi <Artturin@artturin.com>
Diffstat (limited to 'pkgs/os-specific/linux')
-rw-r--r--pkgs/os-specific/linux/hid-tmff2/default.nix36
1 files changed, 36 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 00000000000..ac297c78e10
--- /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;
+  };
+}