mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-15 14:26:33 +01:00
9573db47a5
Newer versions of the out-of-tree rtw88 driver feature significantly expanded hardware support, including many hardware previously supported by the rtl8821au driver.
41 lines
1.2 KiB
Nix
41 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-07-27";
|
|
|
|
src = fetchFromGitHub {
|
|
owner = "lwfinger";
|
|
repo = "rtw88";
|
|
rev = "610e04fc38343dcdcef95475c1579efc07572f1f";
|
|
hash = "sha256-54XhluBnspjyKR+OjYRa5g66N8F0d/oV3x89IV3zdT0=";
|
|
};
|
|
|
|
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;
|
|
};
|
|
}
|