python312Packages.vdf: avoid using pname for src.repo
[NixPkgs.git] / pkgs / os-specific / linux / rtl8814au / default.nix
blobfbe1d62f28d3d5fb51e8fd66f73890196d2ef92e
1 { lib, stdenv, fetchFromGitHub, kernel }:
3 stdenv.mkDerivation {
4   pname = "rtl8814au";
5   version = "${kernel.version}-unstable-2024-05-26";
7   src = fetchFromGitHub {
8     owner = "morrownr";
9     repo = "8814au";
10     rev = "810573647b837d88c4191597a0ea6d226f69f64c";
11     hash = "sha256-AaOnUy3igocsCF/FNogn+z+QcQiid7U7XimE68wAco0=";
12   };
14   nativeBuildInputs = kernel.moduleBuildDependencies;
15   makeFlags = kernel.makeFlags;
17   hardeningDisable = [ "pic" ];
19   env.NIX_CFLAGS_COMPILE = "-Wno-error=incompatible-pointer-types";
21   prePatch = ''
22     substituteInPlace ./Makefile \
23       --replace /lib/modules/ "${kernel.dev}/lib/modules/" \
24       --replace /sbin/depmod \# \
25       --replace '$(MODDESTDIR)' "$out/lib/modules/${kernel.modDirVersion}/kernel/net/wireless/"
26   '';
28   preInstall = ''
29     mkdir -p "$out/lib/modules/${kernel.modDirVersion}/kernel/net/wireless/"
30   '';
32   enableParallelBuilding = true;
34   meta = with lib; {
35     description = "Realtek 8814AU USB WiFi driver";
36     homepage = "https://github.com/morrownr/8814au";
37     license = licenses.gpl2Only;
38     maintainers = [ maintainers.lassulus ];
39   };