depot/third_party/nixpkgs/pkgs/os-specific/linux/rtl88x2bu/default.nix
Default email 88abffb7d2 Project import generated by Copybara.
GitOrigin-RevId: bc9b956714ed6eac5f8888322aac5bc41389defa
2021-09-18 12:52:07 +02:00

40 lines
1.1 KiB
Nix

{ lib, stdenv, fetchFromGitHub, kernel, bc }:
stdenv.mkDerivation rec {
pname = "rtl88x2bu";
version = "${kernel.version}-unstable-2021-05-18";
src = fetchFromGitHub {
owner = "morrownr";
repo = "88x2bu";
rev = "80b03962e33f86f99e898305d8d597140503de03";
sha256 = "sha256-C7XOpKgwxM9UbfW3wHteInTmAUM3FFqN1MHMKxP8gBA=";
};
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 ];
};
}