2021-01-11 07:54:33 +00:00
|
|
|
{ lib, stdenv, fetchFromGitHub, kernel }:
|
2020-05-28 17:33:25 +01:00
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
name = "rtl88xxau-aircrack-${kernel.version}-${version}";
|
2021-04-30 02:24:45 +01:00
|
|
|
rev = "c0ce81745eb3471a639f0efd4d556975153c666e";
|
2020-05-28 17:33:25 +01:00
|
|
|
version = "${builtins.substring 0 6 rev}";
|
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "aircrack-ng";
|
|
|
|
repo = "rtl8812au";
|
|
|
|
inherit rev;
|
2021-04-30 02:24:45 +01:00
|
|
|
sha256 = "131cwwg3czq0i1xray20j71n836g93ac064nvf8wi13c2wr36ppc";
|
2020-05-28 17:33:25 +01:00
|
|
|
};
|
|
|
|
|
|
|
|
buildInputs = kernel.moduleBuildDependencies;
|
|
|
|
|
|
|
|
hardeningDisable = [ "pic" ];
|
|
|
|
|
|
|
|
NIX_CFLAGS_COMPILE="-Wno-error=incompatible-pointer-types";
|
|
|
|
|
|
|
|
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/"
|
|
|
|
'';
|
|
|
|
|
2021-01-11 07:54:33 +00:00
|
|
|
meta = with lib; {
|
2020-05-28 17:33:25 +01: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";
|
|
|
|
license = licenses.gpl2;
|
|
|
|
maintainers = [ maintainers.jethro ];
|
|
|
|
platforms = [ "x86_64-linux" "i686-linux" ];
|
|
|
|
};
|
|
|
|
}
|