12 version = "${kernel.version}-unstable-2024-03-16";
14 src = fetchFromGitHub {
16 repo = "8821au-20210708";
17 rev = "168ac48174067e17ffb9f8b15ab802f37447dacc";
18 hash = "sha256-eB9RCoU5jg5fgZkfcef9fsQ6tyD8gTPD+wYcR6PbWNw=";
24 ] ++ kernel.moduleBuildDependencies;
31 env.NIX_CFLAGS_COMPILE = "-Wno-error=incompatible-pointer-types";
35 "ARCH=${stdenv.hostPlatform.linuxArch}"
36 ("CONFIG_PLATFORM_I386_PC=" + (if stdenv.hostPlatform.isx86 then "y" else "n"))
38 "CONFIG_PLATFORM_ARM_RPI="
39 + (if (stdenv.hostPlatform.isAarch32 || stdenv.hostPlatform.isAarch64) then "y" else "n")
42 ++ lib.optionals (stdenv.hostPlatform != stdenv.buildPlatform) [
43 "CROSS_COMPILE=${stdenv.cc.targetPrefix}"
47 substituteInPlace ./Makefile \
48 --replace /lib/modules/ "${kernel.dev}/lib/modules/" \
49 --replace /sbin/depmod \# \
50 --replace '$(MODDESTDIR)' "$out/lib/modules/${kernel.modDirVersion}/kernel/net/wireless/"
54 mkdir -p "$out/lib/modules/${kernel.modDirVersion}/kernel/net/wireless/"
58 nuke-refs $out/lib/modules/*/kernel/net/wireless/*.ko
61 enableParallelBuilding = true;
64 description = "rtl8821AU and rtl8812AU chipset driver with firmware";
65 homepage = "https://github.com/morrownr/8821au";
66 license = licenses.gpl2Only;
67 platforms = lib.platforms.linux;
68 maintainers = with maintainers; [ plchldr ];