mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-12-22 13:43:22 +00:00
42 lines
1.1 KiB
Nix
42 lines
1.1 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 = "unstable-2022-06-03";
|
|
|
|
src = fetchFromGitHub {
|
|
owner = "lwfinger";
|
|
repo = "rtw88";
|
|
rev = "03da251c76ea1005b42625825c39181e12d75693";
|
|
sha256 = "0l5ysp4x5wzrn48sfjv3rciqhq5ldcmk86b9x6j9775zjj7yw8hw";
|
|
};
|
|
|
|
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 = "The newest Realtek rtlwifi codes";
|
|
homepage = "https://github.com/lwfinger/rtw88";
|
|
license = with licenses; [ bsd3 gpl2Only ];
|
|
maintainers = with maintainers; [ tvorog atila ];
|
|
platforms = platforms.linux;
|
|
broken = kernel.kernelOlder "4.14";
|
|
priority = -1;
|
|
};
|
|
}
|