2016-09-18 20:36:49 +01:00
|
|
|
{ stdenv, lib, fetchFromGitHub, kernel }:
|
|
|
|
|
|
|
|
with lib;
|
|
|
|
|
|
|
|
let modDestDir = "$out/lib/modules/${kernel.modDirVersion}/kernel/drivers/net/wireless/realtek/rtlwifi";
|
|
|
|
|
|
|
|
in stdenv.mkDerivation rec {
|
2019-08-15 13:41:18 +01:00
|
|
|
pname = "rtlwifi_new";
|
2019-09-23 14:37:08 +01:00
|
|
|
version = "2019-08-21";
|
2020-08-13 15:47:15 +01:00
|
|
|
# When updating see https://github.com/lwfinger/rtl8723be/issues/17#issuecomment-657326751
|
2016-09-18 20:36:49 +01:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
2020-08-13 15:47:15 +01:00
|
|
|
owner = "rtlwifi-linux";
|
2016-09-18 20:36:49 +01:00
|
|
|
repo = "rtlwifi_new";
|
2019-09-23 14:37:08 +01:00
|
|
|
rev = "a108e3de87c2ed30b71c3c4595b79ab7a2f9e348";
|
|
|
|
sha256 = "15kjs9i9vvmn1cdzccd5cljf3m45r4ssm65klkj2fdkf3kljj38k";
|
2016-09-18 20:36:49 +01:00
|
|
|
};
|
|
|
|
|
|
|
|
hardeningDisable = [ "pic" "format" ];
|
|
|
|
|
2017-12-29 21:25:13 +00:00
|
|
|
nativeBuildInputs = kernel.moduleBuildDependencies;
|
|
|
|
|
2019-10-27 13:03:25 +00:00
|
|
|
makeFlags = [ "KSRC=${kernel.dev}/lib/modules/${kernel.modDirVersion}/build" ];
|
2016-09-18 20:36:49 +01:00
|
|
|
|
|
|
|
enableParallelBuilding = true;
|
|
|
|
|
|
|
|
installPhase = ''
|
|
|
|
mkdir -p ${modDestDir}
|
|
|
|
find . -name '*.ko' -exec cp --parents {} ${modDestDir} \;
|
|
|
|
find ${modDestDir} -name '*.ko' -exec xz -f {} \;
|
|
|
|
'';
|
|
|
|
|
|
|
|
meta = {
|
|
|
|
description = "The newest Realtek rtlwifi codes";
|
|
|
|
inherit (src.meta) homepage;
|
|
|
|
license = stdenv.lib.licenses.gpl2;
|
|
|
|
platforms = with platforms; linux;
|
|
|
|
maintainers = with maintainers; [ tvorog ];
|
|
|
|
priority = -1;
|
|
|
|
};
|
|
|
|
}
|