diff options
Diffstat (limited to 'pkgs/os-specific/linux/rtl8821au/default.nix')
-rw-r--r-- | pkgs/os-specific/linux/rtl8821au/default.nix | 17 |
1 files changed, 13 insertions, 4 deletions
diff --git a/pkgs/os-specific/linux/rtl8821au/default.nix b/pkgs/os-specific/linux/rtl8821au/default.nix index 0f0dc41bcf48a..6a0da0c5e19b6 100644 --- a/pkgs/os-specific/linux/rtl8821au/default.nix +++ b/pkgs/os-specific/linux/rtl8821au/default.nix @@ -2,13 +2,13 @@ stdenv.mkDerivation rec { pname = "rtl8821au"; - version = "${kernel.version}-unstable-2022-08-22"; + version = "${kernel.version}-unstable-2022-12-22"; src = fetchFromGitHub { owner = "morrownr"; repo = "8821au-20210708"; - rev = "ac275a0ed806fb1c714d8f9194052d4638a68fca"; - sha256 = "sha256-N86zyw5Ap07vk38OfjGfzP7++ysZCIUVnLuwxeY8yws=So"; + rev = "73f2036bc6c8666555fa453d267d3732392c1e00"; + sha256 = "sha256-wx7xQBCfLu3UWB7ghp8dZ7OB2MFd5i8X0/ygyvW2K50="; }; nativeBuildInputs = [ bc nukeReferences ]; @@ -18,6 +18,15 @@ stdenv.mkDerivation rec { NIX_CFLAGS_COMPILE="-Wno-error=incompatible-pointer-types"; + makeFlags = [ + "ARCH=${stdenv.hostPlatform.linuxArch}" + "KSRC=${kernel.dev}/lib/modules/${kernel.modDirVersion}/build" + ("CONFIG_PLATFORM_I386_PC=" + (if stdenv.hostPlatform.isx86 then "y" else "n")) + ("CONFIG_PLATFORM_ARM_RPI=" + (if (stdenv.hostPlatform.isAarch32 || stdenv.hostPlatform.isAarch64) then "y" else "n")) + ] ++ lib.optional (stdenv.hostPlatform != stdenv.buildPlatform) [ + "CROSS_COMPILE=${stdenv.cc.targetPrefix}" + ]; + prePatch = '' substituteInPlace ./Makefile \ --replace /lib/modules/ "${kernel.dev}/lib/modules/" \ @@ -40,7 +49,7 @@ stdenv.mkDerivation rec { description = "rtl8821AU and rtl8812AU chipset driver with firmware"; homepage = "https://github.com/morrownr/8821au"; license = licenses.gpl2Only; - platforms = [ "x86_64-linux" "i686-linux" ]; + platforms = lib.platforms.linux; maintainers = with maintainers; [ plchldr ]; }; } |