3
0
Fork 0
forked from mirrors/nixpkgs
nixpkgs/pkgs/os-specific/linux/rtl8812au/default.nix
2016-11-03 19:53:37 +02:00

37 lines
1.2 KiB
Nix

{ stdenv, fetchFromGitHub, kernel }:
stdenv.mkDerivation rec {
name = "rtl8812au-${kernel.version}-${version}";
version = "4.3.20";
src = fetchFromGitHub {
owner = "Grawp";
repo = "rtl8812au_rtl8821au";
rev = "d716b38abf5ca7da72d2be0adfcebe98cceeda8f";
sha256 = "01z5p2vps3an69bbzca7ig14llc5rd6067pgs47kkhfjbsbws4ry";
};
hardeningDisable = [ "pic" ];
NIX_CFLAGS_COMPILE="-Wno-error=incompatible-pointer-types";
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/"
'';
preInstall = ''
mkdir -p "$out/lib/modules/${kernel.modDirVersion}/kernel/net/wireless/"
'';
meta = {
description = "Driver for Realtek 802.11ac, rtl8812au, provides the 8812au mod";
homepage = "https://github.com/Grawp/rtl8812au_rtl8821au";
license = stdenv.lib.licenses.gpl2;
platforms = [ "x86_64-linux" "i686-linux" ];
broken = (kernel.features.grsecurity or false);
};
}