686ce24904
GitOrigin-RevId: ac1f5b72a9e95873d1de0233fddcb56f99884b37
41 lines
1.2 KiB
Nix
41 lines
1.2 KiB
Nix
{ lib, stdenv, fetchFromGitHub, kernel }:
|
|
|
|
let
|
|
rev = "ee299797bcd54d5b8c58d2da8576c54cea1a03a2";
|
|
in
|
|
stdenv.mkDerivation rec {
|
|
pname = "rtl88xxau-aircrack";
|
|
version = "${kernel.version}-${builtins.substring 0 6 rev}";
|
|
|
|
src = fetchFromGitHub {
|
|
owner = "aircrack-ng";
|
|
repo = "rtl8812au";
|
|
inherit rev;
|
|
sha256 = "sha256-JUyUOqLMD9nSo6i87K/6Ljp+pWSqSBz/IZiFWu03rQw=";
|
|
};
|
|
|
|
nativeBuildInputs = kernel.moduleBuildDependencies;
|
|
|
|
hardeningDisable = [ "pic" ];
|
|
|
|
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 = "Aircrack-ng kernel module for Realtek 88XXau network cards\n(8811au, 8812au, 8814au and 8821au chipsets) with monitor mode and injection support.";
|
|
homepage = "https://github.com/aircrack-ng/rtl8812au";
|
|
license = licenses.gpl2Only;
|
|
maintainers = [ maintainers.jethro ];
|
|
platforms = [ "x86_64-linux" "i686-linux" "aarch64-linux" ];
|
|
};
|
|
}
|