nixpkgs/pkgs/os-specific/linux/rtl8814au/default.nix
Alyssa Ross 999d397259 linuxPackages.rtl8814au: 2021-05-18 -> 2021-10-25
Fixes build with Linux 5.15.
2021-11-06 11:58:29 -07:00

41 lines
1.1 KiB
Nix

{ lib, stdenv, fetchFromGitHub, kernel }:
stdenv.mkDerivation {
pname = "rtl8814au";
version = "${kernel.version}-unstable-2021-10-25";
src = fetchFromGitHub {
owner = "morrownr";
repo = "8814au";
rev = "d36c0874716b0776ac6c7dcd6110598ef0f6dd53";
sha256 = "0lk3ldff489ggbqmlfi4zvnp1cvxj1b06m0fhpzai82070klzzmj";
};
buildInputs = kernel.moduleBuildDependencies;
hardeningDisable = [ "pic" ];
NIX_CFLAGS_COMPILE="-Wno-error=incompatible-pointer-types";
prePatch = ''
substituteInPlace ./Makefile \
--replace /lib/modules/ "${kernel.dev}/lib/modules/" \
--replace '$(shell uname -r)' "${kernel.modDirVersion}" \
--replace /sbin/depmod \# \
--replace '$(MODDESTDIR)' "$out/lib/modules/${kernel.modDirVersion}/kernel/net/wireless/"
'';
preInstall = ''
mkdir -p "$out/lib/modules/${kernel.modDirVersion}/kernel/net/wireless/"
'';
enableParallelBuilding = true;
meta = with lib; {
description = "Realtek 8814AU USB WiFi driver";
homepage = "https://github.com/morrownr/8814au";
license = licenses.gpl2Only;
maintainers = [ maintainers.lassulus ];
};
}