nixpkgs/pkgs/os-specific/linux/rtl88x2bu/default.nix
Nick Cao e984da6da0
Merge pull request #246260 from ius/rtl-fixes
linuxPackages.{rtl8812au,rtl88x2bu}: update to latest
2023-07-30 18:30:26 -06:00

40 lines
1.1 KiB
Nix

{ lib, stdenv, fetchFromGitHub, kernel, bc }:
stdenv.mkDerivation {
pname = "rtl88x2bu";
version = "${kernel.version}-unstable-2023-07-23";
src = fetchFromGitHub {
owner = "morrownr";
repo = "88x2bu-20210702";
rev = "83db18e610845df9434a628ca3feb9004296b307";
sha256 = "sha256-as3S7WQkug3suJ5ovUbRu/UzO5GDrGLdgkiWrCrvztk=";
};
hardeningDisable = [ "pic" ];
nativeBuildInputs = [ bc ] ++ kernel.moduleBuildDependencies;
makeFlags = kernel.makeFlags;
prePatch = ''
substituteInPlace ./Makefile \
--replace /lib/modules/ "${kernel.dev}/lib/modules/" \
--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 rtl88x2bu driver";
homepage = "https://github.com/morrownr/88x2bu-20210702";
license = licenses.gpl2Only;
platforms = platforms.linux;
maintainers = with maintainers; [ otavio ];
};
}