Skip to content

Commit

Permalink
qc71_slimbook_laptop: init at 0-unstable-2024-12-18
Browse files Browse the repository at this point in the history
Package fork of the qc71_laptop package for Slimbook
laptop compatibility

The difference between the packaging files is minimal.
Beyond modifying the source, name, version and expected
meta.*, also modify license to follow upstream:

<     license = licenses.gpl2Plus;
---
>     license = licenses.gpl2Only;
  • Loading branch information
LucasFA committed Jan 7, 2025
1 parent 5cee4a4 commit 21f5c11
Show file tree
Hide file tree
Showing 4 changed files with 60 additions and 0 deletions.
3 changes: 3 additions & 0 deletions nixos/doc/manual/release-notes/rl-2505.section.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.

<!-- To avoid merge conflicts, consider adding your item at an arbitrary place in the list instead. -->

## Backward Incompatibilities {#sec-release-25.05-incompatibilities}
Expand Down
12 changes: 12 additions & 0 deletions pkgs/os-specific/linux/qc71_slimbook_laptop/001-fix-warning.patch
Original file line number Diff line number Diff line change
@@ -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

43 changes: 43 additions & 0 deletions pkgs/os-specific/linux/qc71_slimbook_laptop/default.nix
Original file line number Diff line number Diff line change
@@ -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;
};
}
2 changes: 2 additions & 0 deletions pkgs/top-level/linux-kernels.nix
Original file line number Diff line number Diff line change
Expand Up @@ -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 { };
Expand Down

0 comments on commit 21f5c11

Please sign in to comment.