2021-12-06 16:07:01 +00:00
|
|
|
{ lib, stdenv, fetchFromGitHub, kernel }:
|
2020-05-29 06:06:01 +00:00
|
|
|
|
2021-05-28 09:39:13 +00:00
|
|
|
let
|
2023-02-02 18:25:31 +00:00
|
|
|
rev = "ee299797bcd54d5b8c58d2da8576c54cea1a03a2";
|
2021-05-28 09:39:13 +00:00
|
|
|
in
|
2020-05-29 06:06:01 +00:00
|
|
|
stdenv.mkDerivation rec {
|
2021-05-28 09:39:13 +00:00
|
|
|
pname = "rtl88xxau-aircrack";
|
|
|
|
version = "${kernel.version}-${builtins.substring 0 6 rev}";
|
2020-05-29 06:06:01 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "aircrack-ng";
|
|
|
|
repo = "rtl8812au";
|
|
|
|
inherit rev;
|
2023-02-02 18:25:31 +00:00
|
|
|
sha256 = "sha256-JUyUOqLMD9nSo6i87K/6Ljp+pWSqSBz/IZiFWu03rQw=";
|
2020-05-29 06:06:01 +00:00
|
|
|
};
|
|
|
|
|
2023-02-16 17:41:37 +00:00
|
|
|
nativeBuildInputs = kernel.moduleBuildDependencies;
|
2020-05-29 06:06:01 +00:00
|
|
|
|
|
|
|
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/"
|
|
|
|
'';
|
|
|
|
|
2021-09-18 10:52:07 +00:00
|
|
|
enableParallelBuilding = true;
|
|
|
|
|
2021-01-15 22:18:51 +00:00
|
|
|
meta = with lib; {
|
2020-05-29 06:06:01 +00:00
|
|
|
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";
|
2021-05-28 09:39:13 +00:00
|
|
|
license = licenses.gpl2Only;
|
2020-05-29 06:06:01 +00:00
|
|
|
maintainers = [ maintainers.jethro ];
|
2021-12-06 16:07:01 +00:00
|
|
|
platforms = [ "x86_64-linux" "i686-linux" "aarch64-linux" ];
|
2020-05-29 06:06:01 +00:00
|
|
|
};
|
|
|
|
}
|