2018-02-11 03:05:39 +01:00
|
|
|
{ stdenv, fetchFromGitHub, fetchpatch, kernel, bc }:
|
2015-09-03 11:52:17 +02:00
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
name = "rtl8812au-${kernel.version}-${version}";
|
2018-02-11 03:05:39 +01:00
|
|
|
version = "5.2.20_25672.20171213";
|
2016-02-12 03:51:04 +01:00
|
|
|
|
2015-09-03 11:52:17 +02:00
|
|
|
src = fetchFromGitHub {
|
2018-02-11 03:05:39 +01:00
|
|
|
owner = "zebulon2";
|
|
|
|
repo = "rtl8812au-driver-5.2.20";
|
|
|
|
rev = "aca1e0677bfe56c6c4914358df007c97486e7095";
|
|
|
|
sha256 = "19av8fkh3mvs2f57iibrg0cfyhjnnx4cbnfzv5aj7v5gb0j3dp0p";
|
2015-09-03 11:52:17 +02:00
|
|
|
};
|
2016-02-12 03:51:04 +01:00
|
|
|
|
2018-02-11 03:05:39 +01:00
|
|
|
nativeBuildInputs = [ bc ];
|
2017-12-31 08:12:54 +01:00
|
|
|
buildInputs = kernel.moduleBuildDependencies;
|
|
|
|
|
2018-02-11 03:05:39 +01:00
|
|
|
hardeningDisable = [ "pic" "format" ];
|
2016-08-13 13:20:12 +02:00
|
|
|
|
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
|
|
|
|
2018-02-11 03:05:39 +01:00
|
|
|
meta = with stdenv.lib; {
|
2016-02-27 18:24:00 +01:00
|
|
|
description = "Driver for Realtek 802.11ac, rtl8812au, provides the 8812au mod";
|
2018-02-11 03:05:39 +01:00
|
|
|
homepage = https://github.com/zebulon2/rtl8812au-driver-5.2.20;
|
|
|
|
license = licenses.gpl2;
|
2015-09-03 11:52:17 +02:00
|
|
|
platforms = [ "x86_64-linux" "i686-linux" ];
|
2018-02-11 03:05:39 +01:00
|
|
|
maintainers = with maintainers; [ danielfullmer ];
|
2015-09-03 11:52:17 +02:00
|
|
|
};
|
2016-02-12 03:51:04 +01:00
|
|
|
}
|