2017-08-10 04:47:53 +02:00
|
|
|
{ stdenv, fetchFromGitHub, fetchpatch, kernel }:
|
2015-09-03 11:52:17 +02:00
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
name = "rtl8812au-${kernel.version}-${version}";
|
2016-09-29 08:26:50 +02:00
|
|
|
version = "4.3.20";
|
2016-02-12 03:51:04 +01:00
|
|
|
|
2015-09-03 11:52:17 +02:00
|
|
|
src = fetchFromGitHub {
|
2016-09-29 08:26:50 +02:00
|
|
|
owner = "Grawp";
|
|
|
|
repo = "rtl8812au_rtl8821au";
|
2016-11-02 07:14:10 +01:00
|
|
|
rev = "d716b38abf5ca7da72d2be0adfcebe98cceeda8f";
|
|
|
|
sha256 = "01z5p2vps3an69bbzca7ig14llc5rd6067pgs47kkhfjbsbws4ry";
|
2015-09-03 11:52:17 +02:00
|
|
|
};
|
2016-02-12 03:51:04 +01:00
|
|
|
|
2017-08-10 04:47:53 +02:00
|
|
|
patches = [
|
|
|
|
(fetchpatch { # From PR # 42
|
|
|
|
name = "rtl8812au-4.11.x-fix.patch";
|
|
|
|
url = https://github.com/Grawp/rtl8812au_rtl8821au/commit/3224e74ad9c230b74a658e80dad66ab95c9e2ef5.patch;
|
|
|
|
sha256 = "12g4yvivg4d0qm5cgxs7k54p3y7h1dc2jw6rp1xbppwf3j1z6xks";
|
|
|
|
})
|
|
|
|
(fetchpatch { # From PR #46
|
|
|
|
name = "rtl8812au-4.11.9-fix.patch";
|
|
|
|
url = https://github.com/Grawp/rtl8812au_rtl8821au/commit/58fc45a4511b8b9d6b52813168e3eee657517b1f.patch;
|
|
|
|
sha256 = "18bag2mif5112lap2xvx2bb0wxrd13f9y9cwqv1qzp5nyqiniziz";
|
|
|
|
})
|
|
|
|
(fetchpatch { # From PR #43
|
|
|
|
name = "rtl8812au-4.12-fix.patch";
|
|
|
|
url = https://github.com/Grawp/rtl8812au_rtl8821au/commit/a5475c9f1f54099ca35c8680f2dedee11fa9edec.patch;
|
|
|
|
sha256 = "01xa51whq1xa0sh3y2bhm65f0cryzmv46v530axqjrpnd924432d";
|
|
|
|
})
|
|
|
|
];
|
|
|
|
|
2016-02-26 18:38:15 +01:00
|
|
|
hardeningDisable = [ "pic" ];
|
2016-02-12 03:51:04 +01:00
|
|
|
|
2016-08-13 13:20:12 +02:00
|
|
|
NIX_CFLAGS_COMPILE="-Wno-error=incompatible-pointer-types";
|
|
|
|
|
2017-08-10 04:47:53 +02:00
|
|
|
prePatch = ''
|
2015-09-03 11:52:17 +02:00
|
|
|
substituteInPlace ./Makefile --replace /lib/modules/ "${kernel.dev}/lib/modules/"
|
|
|
|
substituteInPlace ./Makefile --replace '$(shell uname -r)' "${kernel.modDirVersion}"
|
2017-08-12 05:31:08 +02:00
|
|
|
substituteInPlace ./Makefile --replace /sbin/depmod \#
|
2015-09-03 11:52:17 +02:00
|
|
|
substituteInPlace ./Makefile --replace '$(MODDESTDIR)' "$out/lib/modules/${kernel.modDirVersion}/kernel/net/wireless/"
|
|
|
|
'';
|
2016-02-12 03:51:04 +01:00
|
|
|
|
2015-09-03 11:52:17 +02:00
|
|
|
preInstall = ''
|
|
|
|
mkdir -p "$out/lib/modules/${kernel.modDirVersion}/kernel/net/wireless/"
|
|
|
|
'';
|
2016-02-12 03:51:04 +01:00
|
|
|
|
2015-09-03 11:52:17 +02:00
|
|
|
meta = {
|
2016-02-27 18:24:00 +01:00
|
|
|
description = "Driver for Realtek 802.11ac, rtl8812au, provides the 8812au mod";
|
2017-08-01 22:03:30 +02:00
|
|
|
homepage = https://github.com/Grawp/rtl8812au_rtl8821au;
|
2015-09-03 11:52:17 +02:00
|
|
|
license = stdenv.lib.licenses.gpl2;
|
|
|
|
platforms = [ "x86_64-linux" "i686-linux" ];
|
|
|
|
};
|
2016-02-12 03:51:04 +01:00
|
|
|
}
|