2015-09-03 10:52:17 +01:00
|
|
|
{ stdenv, fetchFromGitHub, kernel }:
|
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
name = "rtl8812au-${kernel.version}-${version}";
|
2016-09-29 07:26:50 +01:00
|
|
|
version = "4.3.20";
|
2016-02-12 02:51:04 +00:00
|
|
|
|
2015-09-03 10:52:17 +01:00
|
|
|
src = fetchFromGitHub {
|
2016-09-29 07:26:50 +01:00
|
|
|
owner = "Grawp";
|
|
|
|
repo = "rtl8812au_rtl8821au";
|
|
|
|
rev = "9c5b2978ab079081dd1e981353be681a1cf495de";
|
|
|
|
sha256 = "0bx1vgs2qldwwhdgklbqz2vy9x4jg7cj3d6w6cpkndkcr7h0m5vz";
|
2015-09-03 10:52:17 +01:00
|
|
|
};
|
2016-02-12 02:51:04 +00:00
|
|
|
|
2016-02-26 17:38:15 +00:00
|
|
|
hardeningDisable = [ "pic" ];
|
2016-02-12 02:51:04 +00:00
|
|
|
|
2016-08-13 12:20:12 +01:00
|
|
|
NIX_CFLAGS_COMPILE="-Wno-error=incompatible-pointer-types";
|
|
|
|
|
2015-09-03 10:52:17 +01:00
|
|
|
patchPhase = ''
|
|
|
|
substituteInPlace ./Makefile --replace /lib/modules/ "${kernel.dev}/lib/modules/"
|
|
|
|
substituteInPlace ./Makefile --replace '$(shell uname -r)' "${kernel.modDirVersion}"
|
|
|
|
substituteInPlace ./Makefile --replace /sbin/depmod #
|
|
|
|
substituteInPlace ./Makefile --replace '$(MODDESTDIR)' "$out/lib/modules/${kernel.modDirVersion}/kernel/net/wireless/"
|
|
|
|
'';
|
2016-02-12 02:51:04 +00:00
|
|
|
|
2015-09-03 10:52:17 +01:00
|
|
|
preInstall = ''
|
|
|
|
mkdir -p "$out/lib/modules/${kernel.modDirVersion}/kernel/net/wireless/"
|
|
|
|
'';
|
2016-02-12 02:51:04 +00:00
|
|
|
|
2015-09-03 10:52:17 +01:00
|
|
|
meta = {
|
2016-02-27 17:24:00 +00:00
|
|
|
description = "Driver for Realtek 802.11ac, rtl8812au, provides the 8812au mod";
|
2016-09-29 07:26:50 +01:00
|
|
|
homepage = "https://github.com/Grawp/rtl8812au_rtl8821au";
|
2015-09-03 10:52:17 +01:00
|
|
|
license = stdenv.lib.licenses.gpl2;
|
|
|
|
platforms = [ "x86_64-linux" "i686-linux" ];
|
2016-03-27 00:21:52 +00:00
|
|
|
broken = (kernel.features.grsecurity or false);
|
2015-09-03 10:52:17 +01:00
|
|
|
};
|
2016-02-12 02:51:04 +00:00
|
|
|
}
|