2023-03-23 02:48:13 +00:00
|
|
|
{ lib, stdenv, fetchFromGitHub, kernel, linuxHeaders, pahole }:
|
2019-11-15 15:28:37 +00:00
|
|
|
|
2023-07-15 05:52:23 +00:00
|
|
|
stdenv.mkDerivation (finalAttrs: {
|
2019-11-15 15:28:37 +00:00
|
|
|
pname = "tuxedo-keyboard-${kernel.version}";
|
2023-07-12 11:57:15 +00:00
|
|
|
version = "3.2.7";
|
2019-11-15 15:28:37 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "tuxedocomputers";
|
|
|
|
repo = "tuxedo-keyboard";
|
2023-07-15 05:52:23 +00:00
|
|
|
rev = "v${finalAttrs.version}";
|
2023-07-12 11:57:15 +00:00
|
|
|
hash = "sha256-Q0wnejeLGLSDS0GPxQuYUKCAdzbYA66KT0DuWsEKIRs=";
|
2019-11-15 15:28:37 +00:00
|
|
|
};
|
|
|
|
|
2023-03-23 02:48:13 +00:00
|
|
|
buildInputs = [
|
|
|
|
pahole
|
|
|
|
linuxHeaders
|
|
|
|
];
|
2021-04-30 12:52:14 +00:00
|
|
|
|
2019-11-15 15:28:37 +00:00
|
|
|
makeFlags = [ "KDIR=${kernel.dev}/lib/modules/${kernel.modDirVersion}/build" ];
|
|
|
|
|
|
|
|
installPhase = ''
|
2023-07-15 05:52:23 +00:00
|
|
|
runHook preInstall
|
|
|
|
|
2019-11-15 15:28:37 +00:00
|
|
|
mkdir -p "$out/lib/modules/${kernel.modDirVersion}"
|
2021-08-06 18:27:29 +00:00
|
|
|
|
2022-12-09 17:22:03 +00:00
|
|
|
for module in clevo_acpi.ko clevo_wmi.ko tuxedo_keyboard.ko tuxedo_io/tuxedo_io.ko uniwill_wmi.ko; do
|
2021-08-06 18:27:29 +00:00
|
|
|
mv src/$module $out/lib/modules/${kernel.modDirVersion}
|
|
|
|
done
|
2023-07-15 05:52:23 +00:00
|
|
|
|
|
|
|
runHook postInstall
|
2019-11-15 15:28:37 +00:00
|
|
|
'';
|
|
|
|
|
2023-07-15 05:52:23 +00:00
|
|
|
meta = {
|
|
|
|
broken = stdenv.isAarch64 || (lib.versionOlder kernel.version "5.5");
|
2022-01-11 20:06:23 +00:00
|
|
|
description = "Keyboard and hardware I/O driver for TUXEDO Computers laptops";
|
2023-07-15 05:52:23 +00:00
|
|
|
homepage = "https://github.com/tuxedocomputers/tuxedo-keyboard/";
|
|
|
|
license = lib.licenses.gpl3Plus;
|
2022-01-11 20:06:23 +00:00
|
|
|
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.
|
|
|
|
'';
|
2023-07-15 05:52:23 +00:00
|
|
|
maintainers = [ lib.maintainers.blanky0230 ];
|
|
|
|
platforms = lib.platforms.linux;
|
2019-11-15 15:28:37 +00:00
|
|
|
};
|
2023-07-15 05:52:23 +00:00
|
|
|
})
|