Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Init qc71 slimbook laptop #371848

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions maintainers/maintainer-list.nix
Original file line number Diff line number Diff line change
Expand Up @@ -13378,6 +13378,12 @@
githubId = 15693688;
name = "Lucas Eduardo Wendt";
};
lucasfa = {
name = "Lucas Fehlau Arbulu";
githubId = 23667494;
github = "LucasFA";
matrix = "@lucasfa:matrix.org";
};
lucastso10 = {
email = "[email protected]";
github = "lucastso10";
Expand Down
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

48 changes: 48 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,48 @@
{
lib,
stdenv,
fetchFromGitHub,
kernel,
nix-update-script,
}:

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
'';

passthru.updateScript = nix-update-script {
extraArgs = [ "--version=branch=slimbook" ];
};

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