2021-07-14 22:03:04 +00:00
|
|
|
{ stdenv, lib, fetchFromGitHub, kernel }:
|
|
|
|
|
|
|
|
let
|
|
|
|
modDestDir = "$out/lib/modules/${kernel.modDirVersion}/kernel/drivers/net/wireless/realtek/rtw89";
|
|
|
|
in
|
|
|
|
stdenv.mkDerivation {
|
|
|
|
pname = "rtw89";
|
2022-12-28 21:21:41 +00:00
|
|
|
version = "unstable-2022-12-18";
|
2021-07-14 22:03:04 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "lwfinger";
|
|
|
|
repo = "rtw89";
|
2022-12-28 21:21:41 +00:00
|
|
|
rev = "e834edfe8bee6e27e31c2f783817a9c13ff45665";
|
|
|
|
sha256 = "19ApYiEvA0E6qgf5XQc03paZ+ghjZL8JoC3vSYYw3xU=";
|
2021-07-14 22:03:04 +00:00
|
|
|
};
|
|
|
|
|
2022-03-30 09:31:56 +00:00
|
|
|
nativeBuildInputs = kernel.moduleBuildDependencies;
|
|
|
|
makeFlags = kernel.makeFlags ++ [ "KSRC=${kernel.dev}/lib/modules/${kernel.modDirVersion}/build" ];
|
2021-07-14 22:03:04 +00:00
|
|
|
|
|
|
|
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; {
|
2022-12-28 21:21:41 +00:00
|
|
|
description = " Driver for Realtek 8852AE, 8852BE, and 8853CE, 802.11ax devices";
|
2021-07-14 22:03:04 +00:00
|
|
|
homepage = "https://github.com/lwfinger/rtw89";
|
|
|
|
license = with licenses; [ gpl2Only ];
|
|
|
|
maintainers = with maintainers; [ tvorog ];
|
|
|
|
platforms = platforms.linux;
|
2022-12-28 21:21:41 +00:00
|
|
|
broken = kernel.kernelOlder "5.7";
|
2021-07-14 22:03:04 +00:00
|
|
|
priority = -1;
|
|
|
|
};
|
|
|
|
}
|