Fixes build with 5.19.2 and 6.0. Signed-off-by: Otavio Salvador <otavio@ossystems.com.br>
41 lines
1.2 KiB
Nix
41 lines
1.2 KiB
Nix
{ lib, stdenv, fetchFromGitHub, kernel, bc }:
|
|
|
|
stdenv.mkDerivation rec {
|
|
pname = "rtl88x2bu";
|
|
version = "${kernel.version}-unstable-2022-08-18";
|
|
|
|
src = fetchFromGitHub {
|
|
owner = "morrownr";
|
|
repo = "88x2bu-20210702";
|
|
rev = "6dda660a6af1b18654bbbbedd933cdf30683b7a1";
|
|
sha256 = "sha256-o+SLc8EQA3DHYdZQToyoZS0TFkuVEnFStQQUOCFPYXI=";
|
|
};
|
|
|
|
hardeningDisable = [ "pic" ];
|
|
|
|
nativeBuildInputs = [ bc ] ++ kernel.moduleBuildDependencies;
|
|
makeFlags = kernel.makeFlags;
|
|
|
|
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 rtl88x2bu driver";
|
|
homepage = "https://github.com/morrownr/88x2bu-20210702";
|
|
license = licenses.gpl2Only;
|
|
platforms = platforms.linux;
|
|
maintainers = [ maintainers.ralith ];
|
|
};
|
|
}
|