depot/third_party/nixpkgs/pkgs/os-specific/linux/rtl88x2bu/default.nix
Default email ce641f4048 Project import generated by Copybara.
GitOrigin-RevId: bc5d68306b40b8522ffb69ba6cff91898c2fbbff
2021-12-06 17:07:01 +01:00

40 lines
1.1 KiB
Nix

{ lib, stdenv, fetchFromGitHub, kernel, bc }:
stdenv.mkDerivation rec {
pname = "rtl88x2bu";
version = "${kernel.version}-unstable-2021-11-04";
src = fetchFromGitHub {
owner = "morrownr";
repo = "88x2bu";
rev = "745d134080b74b92389ffe59c03dcfd6658f8655";
sha256 = "0f1hsfdw3ar78kqzr4hi04kpp5wnx0hd29f9rm698k0drxaw1g44";
};
hardeningDisable = [ "pic" ];
nativeBuildInputs = [ bc ];
buildInputs = kernel.moduleBuildDependencies;
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";
license = licenses.gpl2Only;
platforms = platforms.linux;
maintainers = [ maintainers.ralith ];
};
}