tuxedo-keyboard: set it as broken for kernel <= 5.4

- Switch to `finalAttrs` pattern
- Add missing phase hooks
- Sort `meta` attribute
- Update `meta.broken` attribute
This commit is contained in:
Pol Dellaiera 2023-07-15 07:52:23 +02:00
parent 27f58aceb0
commit 604c2608b4
No known key found for this signature in database
GPG key ID: D476DFE9C67467CA

View file

@ -1,13 +1,13 @@
{ lib, stdenv, fetchFromGitHub, kernel, linuxHeaders, pahole }:
stdenv.mkDerivation rec {
stdenv.mkDerivation (finalAttrs: {
pname = "tuxedo-keyboard-${kernel.version}";
version = "3.2.7";
src = fetchFromGitHub {
owner = "tuxedocomputers";
repo = "tuxedo-keyboard";
rev = "v${version}";
rev = "v${finalAttrs.version}";
hash = "sha256-Q0wnejeLGLSDS0GPxQuYUKCAdzbYA66KT0DuWsEKIRs=";
};
@ -19,25 +19,29 @@ stdenv.mkDerivation rec {
makeFlags = [ "KDIR=${kernel.dev}/lib/modules/${kernel.modDirVersion}/build" ];
installPhase = ''
runHook preInstall
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
'';
meta = with lib; {
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.
'';
homepage = "https://github.com/tuxedocomputers/tuxedo-keyboard/";
license = licenses.gpl3Plus;
platforms = platforms.linux;
broken = stdenv.isAarch64;
maintainers = [ maintainers.blanky0230 ];
maintainers = [ lib.maintainers.blanky0230 ];
platforms = lib.platforms.linux;
};
}
})