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 {
|
|
|
|
name = "rtlwifi_new-${version}";
|
2018-02-28 00:31:25 +00:00
|
|
|
version = "2018-02-17";
|
2016-09-18 20:36:49 +01:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "lwfinger";
|
|
|
|
repo = "rtlwifi_new";
|
2018-02-28 00:31:25 +00:00
|
|
|
rev = "0588ac0cc5f530e7764705416370b70d3c2afedc";
|
|
|
|
sha256 = "1vs8rfw19lcs04bapa97zlnl5x0kf02sdw5ik0hdm27wgk0z969m";
|
2016-09-18 20:36:49 +01:00
|
|
|
};
|
|
|
|
|
|
|
|
hardeningDisable = [ "pic" "format" ];
|
|
|
|
|
2017-12-29 21:25:13 +00:00
|
|
|
nativeBuildInputs = kernel.moduleBuildDependencies;
|
|
|
|
|
2016-09-18 20:36:49 +01:00
|
|
|
makeFlags = "KSRC=${kernel.dev}/lib/modules/${kernel.modDirVersion}/build";
|
|
|
|
|
|
|
|
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;
|
|
|
|
};
|
|
|
|
}
|