2023-03-24 00:07:29 +00:00
|
|
|
{ lib, stdenv, fetchFromGitHub, kernel, linuxHeaders, pahole }:
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
pname = "tuxedo-keyboard-${kernel.version}";
|
2023-03-08 16:32:21 +00:00
|
|
|
version = "3.1.4";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "tuxedocomputers";
|
|
|
|
repo = "tuxedo-keyboard";
|
2021-05-20 23:08:51 +00:00
|
|
|
rev = "v${version}";
|
2023-03-08 16:32:21 +00:00
|
|
|
sha256 = "h6+br+JPEItym83MaVt+xo6o/zMtTv8+wsBoTeYa2AM=";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
2023-03-24 00:07:29 +00:00
|
|
|
buildInputs = [
|
|
|
|
pahole
|
|
|
|
linuxHeaders
|
|
|
|
];
|
2021-05-20 23:08:51 +00:00
|
|
|
|
2020-04-24 23:36:52 +00:00
|
|
|
makeFlags = [ "KDIR=${kernel.dev}/lib/modules/${kernel.modDirVersion}/build" ];
|
|
|
|
|
|
|
|
installPhase = ''
|
|
|
|
mkdir -p "$out/lib/modules/${kernel.modDirVersion}"
|
2021-09-18 10:52:07 +00:00
|
|
|
|
2022-12-28 21:21:41 +00:00
|
|
|
for module in clevo_acpi.ko clevo_wmi.ko tuxedo_keyboard.ko tuxedo_io/tuxedo_io.ko uniwill_wmi.ko; do
|
2021-09-18 10:52:07 +00:00
|
|
|
mv src/$module $out/lib/modules/${kernel.modDirVersion}
|
|
|
|
done
|
2020-04-24 23:36:52 +00:00
|
|
|
'';
|
|
|
|
|
2021-01-15 22:18:51 +00:00
|
|
|
meta = with lib; {
|
2022-01-13 20:06:32 +00:00
|
|
|
description = "Keyboard and hardware I/O driver for TUXEDO Computers laptops";
|
|
|
|
longDescription = ''
|
|
|
|
This driver provides support for Fn keys, brightness/color/mode for most TUXEDO
|
|
|
|
keyboards (except white backlight-only models).
|
|
|
|
|
|
|
|
Can be used with the "hardware.tuxedo-keyboard" NixOS module.
|
|
|
|
'';
|
2020-04-24 23:36:52 +00:00
|
|
|
homepage = "https://github.com/tuxedocomputers/tuxedo-keyboard/";
|
2021-05-20 23:08:51 +00:00
|
|
|
license = licenses.gpl3Plus;
|
2020-04-24 23:36:52 +00:00
|
|
|
platforms = platforms.linux;
|
2021-06-04 09:07:49 +00:00
|
|
|
broken = stdenv.isAarch64;
|
2020-04-24 23:36:52 +00:00
|
|
|
maintainers = [ maintainers.blanky0230 ];
|
|
|
|
};
|
|
|
|
}
|