From afa9031062c40ef75d95c2c91c3c0d6e4925f3e7 Mon Sep 17 00:00:00 2001 From: Daniel Fullmer Date: Fri, 11 Aug 2017 23:31:08 -0400 Subject: [PATCH 1/2] rtl8812au: Fix comment typo The commit 5d693c84d2e492080e982bf7429d6e923229d721 cleaned up the substitute() function in stdenv and caused this line to fail. --- pkgs/os-specific/linux/rtl8812au/default.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkgs/os-specific/linux/rtl8812au/default.nix b/pkgs/os-specific/linux/rtl8812au/default.nix index 34fc7b5c759..6528614f32d 100644 --- a/pkgs/os-specific/linux/rtl8812au/default.nix +++ b/pkgs/os-specific/linux/rtl8812au/default.nix @@ -18,7 +18,7 @@ stdenv.mkDerivation rec { 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 /sbin/depmod \# substituteInPlace ./Makefile --replace '$(MODDESTDIR)' "$out/lib/modules/${kernel.modDirVersion}/kernel/net/wireless/" ''; From c08ceb1df86cc5a434632c45dd2a32b66f9f3687 Mon Sep 17 00:00:00 2001 From: Daniel Fullmer Date: Wed, 9 Aug 2017 22:47:53 -0400 Subject: [PATCH 2/2] rtl8812au: Fixes for newer linux kernels This includes the patches from the pull requests #42, #43, and #46 submitted to Grawp/rtl8812au_rtl8821au --- pkgs/os-specific/linux/rtl8812au/default.nix | 22 ++++++++++++++++++-- 1 file changed, 20 insertions(+), 2 deletions(-) diff --git a/pkgs/os-specific/linux/rtl8812au/default.nix b/pkgs/os-specific/linux/rtl8812au/default.nix index 6528614f32d..4ea6b35e377 100644 --- a/pkgs/os-specific/linux/rtl8812au/default.nix +++ b/pkgs/os-specific/linux/rtl8812au/default.nix @@ -1,4 +1,4 @@ -{ stdenv, fetchFromGitHub, kernel }: +{ stdenv, fetchFromGitHub, fetchpatch, kernel }: stdenv.mkDerivation rec { name = "rtl8812au-${kernel.version}-${version}"; @@ -11,11 +11,29 @@ stdenv.mkDerivation rec { sha256 = "01z5p2vps3an69bbzca7ig14llc5rd6067pgs47kkhfjbsbws4ry"; }; + 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"; + }) + ]; + hardeningDisable = [ "pic" ]; NIX_CFLAGS_COMPILE="-Wno-error=incompatible-pointer-types"; - patchPhase = '' + prePatch = '' substituteInPlace ./Makefile --replace /lib/modules/ "${kernel.dev}/lib/modules/" substituteInPlace ./Makefile --replace '$(shell uname -r)' "${kernel.modDirVersion}" substituteInPlace ./Makefile --replace /sbin/depmod \#