diff --git a/nixos/doc/manual/release-notes/rl-2505.section.md b/nixos/doc/manual/release-notes/rl-2505.section.md index 280b3ddb94883..7bed849c2a456 100644 --- a/nixos/doc/manual/release-notes/rl-2505.section.md +++ b/nixos/doc/manual/release-notes/rl-2505.section.md @@ -97,6 +97,9 @@ - [git-worktree-switcher](https://github.com/mateusauler/git-worktree-switcher), switch between git worktrees with speed. Available as [programs.git-worktree-switcher](#opt-programs.git-worktree-switcher.enable) + +- [qc71_slimbook_laptop](https://github.com/Slimbook-Team/qc71_laptop), a kernel module for Slimbook laptops. + ## Backward Incompatibilities {#sec-release-25.05-incompatibilities} diff --git a/pkgs/os-specific/linux/qc71_slimbook_laptop/001-fix-warning.patch b/pkgs/os-specific/linux/qc71_slimbook_laptop/001-fix-warning.patch new file mode 100644 index 0000000000000..8ff14a1573a96 --- /dev/null +++ b/pkgs/os-specific/linux/qc71_slimbook_laptop/001-fix-warning.patch @@ -0,0 +1,12 @@ +diff --git a/events.c b/events.c +--- a/events.c ++++ b/events.c +@@ -120,7 +120,7 @@ static void emit_keyboard_led_hw_changed(void) + up_read(&leds_list_lock); + } + #else +-static inline emit_keyboard_led_hw_changed(void) ++static inline void emit_keyboard_led_hw_changed(void) + { } + #endif + diff --git a/pkgs/os-specific/linux/qc71_slimbook_laptop/default.nix b/pkgs/os-specific/linux/qc71_slimbook_laptop/default.nix new file mode 100644 index 0000000000000..43ca6686a1670 --- /dev/null +++ b/pkgs/os-specific/linux/qc71_slimbook_laptop/default.nix @@ -0,0 +1,43 @@ +{ + lib, + stdenv, + fetchFromGitHub, + kernel, +}: + +stdenv.mkDerivation rec { + pname = "qc71_slimbook_laptop"; + version = "0-unstable-2024-12-18"; + + src = fetchFromGitHub { + owner = "Slimbook-Team"; + repo = "qc71_laptop"; + rev = "e130a03628dfc12105f4832ecf59f487f32bcdd7"; + hash = "sha256-xgGxkZyJ2UMgEweUfmSdvsnqwOyghafz2kxGeKCLqqg="; + }; + + patches = [ + ./001-fix-warning.patch + ]; + + nativeBuildInputs = kernel.moduleBuildDependencies; + + makeFlags = kernel.makeFlags ++ [ + "VERSION=${version}" + "KDIR=${kernel.dev}/lib/modules/${kernel.modDirVersion}/build" + ]; + + installPhase = '' + runHook preInstall + install -D qc71_laptop.ko -t $out/lib/modules/${kernel.modDirVersion}/extra + runHook postInstall + ''; + + meta = with lib; { + description = "Linux driver for QC71 laptop, with Slimbook patches"; + homepage = "https://github.com/Slimbook-Team/qc71_laptop/"; + license = licenses.gpl2Only; + maintainers = with maintainers; [ lucasfa ]; + platforms = platforms.linux; + }; +} diff --git a/pkgs/top-level/linux-kernels.nix b/pkgs/top-level/linux-kernels.nix index 0eed40c970a8e..77d9ca0f420f5 100644 --- a/pkgs/top-level/linux-kernels.nix +++ b/pkgs/top-level/linux-kernels.nix @@ -601,6 +601,8 @@ in { qc71_laptop = callPackage ../os-specific/linux/qc71_laptop { }; + qc71_slimbook_laptop = callPackage ../os-specific/linux/qc71_slimbook_laptop { }; + hid-ite8291r3 = callPackage ../os-specific/linux/hid-ite8291r3 { }; hid-t150 = callPackage ../os-specific/linux/hid-t150 { };