depot/pkgs/os-specific/linux/rtl8188eus-aircrack/default.nix
Luke Granger-Brown 57725ef3ec Squashed 'third_party/nixpkgs/' content from commit 76612b17c0ce
git-subtree-dir: third_party/nixpkgs
git-subtree-split: 76612b17c0ce71689921ca12d9ffdc9c23ce40b2
2024-11-10 23:59:47 +00:00

44 lines
1.2 KiB
Nix

{
lib,
stdenv,
fetchFromGitHub,
kernel,
bc,
}:
stdenv.mkDerivation {
pname = "rtl8188eus-aircrack";
version = "${kernel.version}-unstable-2024-09-18";
src = fetchFromGitHub {
owner = "aircrack-ng";
repo = "rtl8188eus";
rev = "f969c544ab6100da3d80a5709e077f920f2df698";
sha256 = "sha256-uwO2nDDff4t0PZw3mLWmUPOHHftDgoaBaWMXQKHQunI=";
};
prePatch = ''
substituteInPlace ./Makefile \
--replace /lib/modules/ "${kernel.dev}/lib/modules/" \
--replace /sbin/depmod \# \
--replace '$(MODDESTDIR)' "$out/lib/modules/${kernel.modDirVersion}/kernel/net/wireless/"
'';
hardeningDisable = [ "pic" ];
enableParallelBuilding = true;
nativeBuildInputs = [ bc ] ++ kernel.moduleBuildDependencies;
preInstall = ''
mkdir -p "$out/lib/modules/${kernel.modDirVersion}/kernel/net/wireless/"
'';
meta = with lib; {
description = "RealTek RTL8188eus WiFi driver with monitor mode & frame injection support";
homepage = "https://github.com/aircrack-ng/rtl8188eus";
license = licenses.gpl2Only;
maintainers = with maintainers; [ moni ];
broken = (lib.versions.majorMinor kernel.version) == "5.4" && kernel.isHardened;
};
}