diff options
author | Artturi <Artturin@artturin.com> | 2023-11-10 16:02:36 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-11-10 16:02:36 +0200 |
commit | 94633f04a3497b60cf15184b05fae12f283e1111 (patch) | |
tree | caf607ad7b4b08450ea637c8af4bbdbf555e8280 /pkgs/os-specific | |
parent | c2b5a5e7f7279707e359dcd4817b717c31cbb174 (diff) | |
parent | 546fc20314e70669836d049cf2339d6aed1dee71 (diff) |
Merge pull request #257386 from RaySlash/hid-tmff2
Diffstat (limited to 'pkgs/os-specific')
-rw-r--r-- | pkgs/os-specific/linux/hid-tmff2/default.nix | 36 |
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 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; + }; +} |