2018-07-21 00:44:44 +00:00
|
|
|
{ stdenv, fetchFromGitHub, kernel, bc }:
|
2015-09-03 09:52:17 +00:00
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
name = "rtl8812au-${kernel.version}-${version}";
|
2018-12-15 03:37:18 +00:00
|
|
|
version = "5.2.20.2_28373.20180619";
|
2016-02-12 02:51:04 +00:00
|
|
|
|
2015-09-03 09:52:17 +00:00
|
|
|
src = fetchFromGitHub {
|
2018-02-11 02:05:39 +00:00
|
|
|
owner = "zebulon2";
|
|
|
|
repo = "rtl8812au-driver-5.2.20";
|
2018-12-15 03:37:18 +00:00
|
|
|
rev = "2dad788f5d71d50df4f692b67a4428967ba3d42c";
|
|
|
|
sha256 = "17pn73j2xqya0g8f86hn1jyf9x9wp52md05yrg1md58ixsbh1kz3";
|
2015-09-03 09:52:17 +00:00
|
|
|
};
|
2016-02-12 02:51:04 +00:00
|
|
|
|
2018-02-11 02:05:39 +00:00
|
|
|
nativeBuildInputs = [ bc ];
|
2017-12-31 07:12:54 +00:00
|
|
|
buildInputs = kernel.moduleBuildDependencies;
|
|
|
|
|
2018-02-11 02:05:39 +00:00
|
|
|
hardeningDisable = [ "pic" "format" ];
|
2016-08-13 11:20:12 +00:00
|
|
|
|
2017-08-10 02:47:53 +00:00
|
|
|
prePatch = ''
|
2015-09-03 09:52:17 +00:00
|
|
|
substituteInPlace ./Makefile --replace /lib/modules/ "${kernel.dev}/lib/modules/"
|
|
|
|
substituteInPlace ./Makefile --replace '$(shell uname -r)' "${kernel.modDirVersion}"
|
2017-08-12 03:31:08 +00:00
|
|
|
substituteInPlace ./Makefile --replace /sbin/depmod \#
|
2015-09-03 09:52:17 +00:00
|
|
|
substituteInPlace ./Makefile --replace '$(MODDESTDIR)' "$out/lib/modules/${kernel.modDirVersion}/kernel/net/wireless/"
|
|
|
|
'';
|
2016-02-12 02:51:04 +00:00
|
|
|
|
2015-09-03 09:52:17 +00:00
|
|
|
preInstall = ''
|
|
|
|
mkdir -p "$out/lib/modules/${kernel.modDirVersion}/kernel/net/wireless/"
|
|
|
|
'';
|
2016-02-12 02:51:04 +00:00
|
|
|
|
2018-02-11 02:05:39 +00:00
|
|
|
meta = with stdenv.lib; {
|
2016-02-27 17:24:00 +00:00
|
|
|
description = "Driver for Realtek 802.11ac, rtl8812au, provides the 8812au mod";
|
2018-02-11 02:05:39 +00:00
|
|
|
homepage = https://github.com/zebulon2/rtl8812au-driver-5.2.20;
|
|
|
|
license = licenses.gpl2;
|
2015-09-03 09:52:17 +00:00
|
|
|
platforms = [ "x86_64-linux" "i686-linux" ];
|
2018-02-11 02:05:39 +00:00
|
|
|
maintainers = with maintainers; [ danielfullmer ];
|
2015-09-03 09:52:17 +00:00
|
|
|
};
|
2016-02-12 02:51:04 +00:00
|
|
|
}
|