mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-12-23 22:23:15 +00:00
d4ca6ff3f4
Fixes build with Linux 5.18.
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-05-23";
|
|
|
|
src = fetchFromGitHub {
|
|
owner = "morrownr";
|
|
repo = "88x2bu-20210702";
|
|
rev = "3fbe980a9a8cee223e4671449128212cf7514b3c";
|
|
sha256 = "1p4bp8g94ny385nl3m2ca824dbm6lhjvh7s5rqyzk220il2sa0nd";
|
|
};
|
|
|
|
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 ];
|
|
};
|
|
}
|