2021-06-30 17:21:22 +02:00
|
|
|
{ lib, stdenv, fetchFromGitHub, kernel, linuxHeaders }:
|
2019-11-15 16:28:37 +01:00
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
pname = "tuxedo-keyboard-${kernel.version}";
|
2022-01-11 20:58:14 +01:00
|
|
|
version = "3.0.9";
|
2019-11-15 16:28:37 +01:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "tuxedocomputers";
|
|
|
|
repo = "tuxedo-keyboard";
|
2021-04-30 14:52:14 +02:00
|
|
|
rev = "v${version}";
|
2022-01-11 20:58:14 +01:00
|
|
|
sha256 = "HGN2CKJ76FzgKkOsU5pLMsRl7hEGMcZ8Loa2YP0P558=";
|
2019-11-15 16:28:37 +01:00
|
|
|
};
|
|
|
|
|
2021-04-30 14:52:14 +02:00
|
|
|
buildInputs = [ linuxHeaders ];
|
|
|
|
|
2019-11-15 16:28:37 +01:00
|
|
|
makeFlags = [ "KDIR=${kernel.dev}/lib/modules/${kernel.modDirVersion}/build" ];
|
|
|
|
|
|
|
|
installPhase = ''
|
|
|
|
mkdir -p "$out/lib/modules/${kernel.modDirVersion}"
|
2021-08-06 20:27:29 +02:00
|
|
|
|
|
|
|
for module in clevo_acpi.ko clevo_wmi.ko tuxedo_keyboard.ko tuxedo_io/tuxedo_io.ko; do
|
|
|
|
mv src/$module $out/lib/modules/${kernel.modDirVersion}
|
|
|
|
done
|
2019-11-15 16:28:37 +01:00
|
|
|
'';
|
|
|
|
|
2021-01-11 08:54:33 +01:00
|
|
|
meta = with lib; {
|
2022-01-11 21:06:23 +01: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.
|
|
|
|
'';
|
2019-11-15 16:28:37 +01:00
|
|
|
homepage = "https://github.com/tuxedocomputers/tuxedo-keyboard/";
|
2021-04-30 14:52:14 +02:00
|
|
|
license = licenses.gpl3Plus;
|
2019-11-21 23:10:41 +01:00
|
|
|
platforms = platforms.linux;
|
2021-06-03 17:14:53 +02:00
|
|
|
broken = stdenv.isAarch64;
|
2019-11-21 23:10:41 +01:00
|
|
|
maintainers = [ maintainers.blanky0230 ];
|
2019-11-15 16:28:37 +01:00
|
|
|
};
|
|
|
|
}
|