nixpkgs mirror (for testing)
github.com/NixOS/nixpkgs
nix
1{
2 lib,
3 stdenv,
4 fetchFromGitHub,
5 kernel,
6 kernelModuleMakeFlags,
7}:
8
9stdenv.mkDerivation rec {
10 pname = "hid-ite8291r3";
11 version = "unstable-2022-06-01";
12
13 src = fetchFromGitHub {
14 owner = "pobrn";
15 repo = "hid-ite8291r3";
16 rev = "48e04cb96517f8574225ebabb286775feb942ef5";
17 hash = "sha256-/69vvVbAVULDW8rwDYSj5706vrqJ6t4s/T6s3vmG9wk=";
18 };
19
20 nativeBuildInputs = kernel.moduleBuildDependencies;
21
22 makeFlags = kernelModuleMakeFlags ++ [
23 "VERSION=${version}"
24 "KDIR=${kernel.dev}/lib/modules/${kernel.modDirVersion}/build"
25 ];
26
27 installPhase = ''
28 runHook preInstall
29 install -D hid-ite8291r3.ko -t $out/lib/modules/${kernel.modDirVersion}/extra
30 runHook postInstall
31 '';
32
33 meta = with lib; {
34 description = "Linux driver for the ITE 8291 RGB keyboard backlight controller";
35 homepage = "https://github.com/pobrn/hid-ite8291r3/";
36 license = licenses.gpl2Plus;
37 maintainers = with maintainers; [ aacebedo ];
38 platforms = platforms.linux;
39 broken = kernel.kernelOlder "5.9";
40 };
41}