depot/third_party/nixpkgs/pkgs/os-specific/linux/rtl8814au/default.nix
Default email 4bac34ead1 Project import generated by Copybara.
GitOrigin-RevId: 724bfc0892363087709bd3a5a1666296759154b1
2023-02-09 12:40:11 +01:00

41 lines
1.2 KiB
Nix

{ lib, stdenv, fetchFromGitHub, kernel }:
stdenv.mkDerivation {
pname = "rtl8814au";
version = "${kernel.version}-unstable-2022-11-09";
src = fetchFromGitHub {
owner = "morrownr";
repo = "8814au";
rev = "932df6f7da6c3a384cf91f33eb195097eb0cb6c5";
hash = "sha256-nMQiT59IIhzpePWWDiyCQFmYLWM42L/mG0BKsbEwreo=";
};
nativeBuildInputs = kernel.moduleBuildDependencies;
makeFlags = kernel.makeFlags;
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 ];
};
}