2021-03-13 20:57:27 +00:00
|
|
|
{ stdenv, lib, fetchFromGitHub, kernel }:
|
|
|
|
|
|
|
|
let
|
|
|
|
modDestDir = "$out/lib/modules/${kernel.modDirVersion}/kernel/drivers/net/wireless/realtek/rtw88";
|
|
|
|
in
|
|
|
|
stdenv.mkDerivation {
|
|
|
|
pname = "rtw88";
|
2022-05-25 21:20:35 +01:00
|
|
|
version = "unstable-2022-05-08";
|
2021-03-13 20:57:27 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "lwfinger";
|
|
|
|
repo = "rtw88";
|
2022-05-25 21:20:35 +01:00
|
|
|
rev = "dbcc43c31a4576f90e1e468d3a85c2dfdb25ec42";
|
|
|
|
hash = "sha256-IDHolspYtwjV5r5WArWl1g4zgKLvPd4ydKKH/aE5NSg=";
|
2021-03-13 20:57:27 +00:00
|
|
|
};
|
|
|
|
|
2022-02-10 02:52:31 +00:00
|
|
|
nativeBuildInputs = kernel.moduleBuildDependencies;
|
|
|
|
makeFlags = kernel.makeFlags ++ [ "KSRC=${kernel.dev}/lib/modules/${kernel.modDirVersion}/build" ];
|
2021-03-13 20:57:27 +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; {
|
|
|
|
description = "The newest Realtek rtlwifi codes";
|
|
|
|
homepage = "https://github.com/lwfinger/rtw88";
|
|
|
|
license = with licenses; [ bsd3 gpl2Only ];
|
2022-05-25 21:20:35 +01:00
|
|
|
maintainers = with maintainers; [ tvorog atila ];
|
2021-03-13 20:57:27 +00:00
|
|
|
platforms = platforms.linux;
|
2022-05-25 21:20:35 +01:00
|
|
|
broken = kernel.kernelOlder "4.14";
|
2021-03-13 20:57:27 +00:00
|
|
|
priority = -1;
|
|
|
|
};
|
|
|
|
}
|