python312Packages.vdf: avoid using pname for src.repo
[NixPkgs.git] / pkgs / os-specific / linux / rtl88x2bu / default.nix
blob91ed7cf9b490535fc05e678788bd19082ed56a7d
2   lib,
3   stdenv,
4   fetchFromGitHub,
5   kernel,
6   bc,
7 }:
9 stdenv.mkDerivation {
10   pname = "rtl88x2bu";
11   version = "${kernel.version}-unstable-2024-06-09";
13   src = fetchFromGitHub {
14     owner = "morrownr";
15     repo = "88x2bu-20210702";
16     rev = "62f3a86a2687fe98bd441e0aff5adf87d95c238a";
17     hash = "sha256-gQWk1nhtT0W2dY5uQitWabBGEDfZpmJAoJg+j2ndO00=";
18   };
20   hardeningDisable = [ "pic" ];
22   nativeBuildInputs = [ bc ] ++ kernel.moduleBuildDependencies;
23   makeFlags = kernel.makeFlags;
25   prePatch = ''
26     substituteInPlace ./Makefile \
27       --replace /lib/modules/ "${kernel.dev}/lib/modules/" \
28       --replace /sbin/depmod \# \
29       --replace '$(MODDESTDIR)' "$out/lib/modules/${kernel.modDirVersion}/kernel/net/wireless/"
30   '';
32   preInstall = ''
33     mkdir -p "$out/lib/modules/${kernel.modDirVersion}/kernel/net/wireless/"
34   '';
36   enableParallelBuilding = true;
38   meta = with lib; {
39     description = "Realtek rtl88x2bu driver";
40     homepage = "https://github.com/morrownr/88x2bu-20210702";
41     license = licenses.gpl2Only;
42     platforms = platforms.linux;
43     maintainers = with maintainers; [ otavio ];
44   };