nixpkgs/pkgs/os-specific/linux/rtw88/default.nix
Alois Wohlschlager cba9ec8bc8
linuxPackages.rtw88: 0-unstable-2024-07-27 -> 0-unstable-2024-08-22
Changes: 610e04fc38...764a1ee307
Notably, this fixes the build against Linux 6.11.
2024-09-17 18:57:57 +02:00

42 lines
1.2 KiB
Nix

{ stdenv, lib, fetchFromGitHub, kernel }:
let
modDestDir = "$out/lib/modules/${kernel.modDirVersion}/kernel/drivers/net/wireless/realtek/rtw88";
in
stdenv.mkDerivation {
pname = "rtw88";
version = "0-unstable-2024-08-22";
src = fetchFromGitHub {
owner = "lwfinger";
repo = "rtw88";
rev = "764a1ee307d7e5720a93b8139c94d76737eced91";
hash = "sha256-xHo9Qww3w36/UFhMhoLjSzZKpC2VKywJZlCPL30XirA=";
};
nativeBuildInputs = kernel.moduleBuildDependencies;
makeFlags = kernel.makeFlags ++ [ "KSRC=${kernel.dev}/lib/modules/${kernel.modDirVersion}/build" ];
enableParallelBuilding = true;
installPhase = ''
runHook preInstall
mkdir -p ${modDestDir}
find . -name '*.ko' -exec cp --parents {} ${modDestDir} \;
find ${modDestDir} -name '*.ko' -exec xz -f {} \;
runHook postInstall
'';
meta = with lib; {
description = "Backport of the latest Realtek RTW88 driver from wireless-next for older kernels";
homepage = "https://github.com/lwfinger/rtw88";
license = with licenses; [ bsd3 gpl2Only ];
maintainers = with maintainers; [ tvorog atila ];
platforms = platforms.linux;
broken = kernel.kernelOlder "4.20";
priority = -1;
};
}