nixpkgs/pkgs/os-specific/linux/tuxedo-keyboard/default.nix

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

48 lines
1.4 KiB
Nix
Raw Normal View History

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