From c63d4270feed5eb6c578fe2d9398d3f6f2f96811 Mon Sep 17 00:00:00 2001 From: fortuneteller2k Date: Sun, 23 May 2021 19:15:37 +0800 Subject: [PATCH] linuxPackages.rtl8188eus-aircrack: init at unstable-2021-05-04 --- .../linux/rtl8188eus-aircrack/default.nix | 39 +++++++++++++++++++ pkgs/top-level/all-packages.nix | 2 + 2 files changed, 41 insertions(+) create mode 100644 pkgs/os-specific/linux/rtl8188eus-aircrack/default.nix diff --git a/pkgs/os-specific/linux/rtl8188eus-aircrack/default.nix b/pkgs/os-specific/linux/rtl8188eus-aircrack/default.nix new file mode 100644 index 000000000000..93a91f0447a4 --- /dev/null +++ b/pkgs/os-specific/linux/rtl8188eus-aircrack/default.nix @@ -0,0 +1,39 @@ +{ lib, stdenv, fetchFromGitHub, kernel, bc }: + +stdenv.mkDerivation { + pname = "rtl8188eus-aircrack"; + version = "${kernel.version}-unstable-2021-05-04"; + + src = fetchFromGitHub { + owner = "aircrack-ng"; + repo = "rtl8188eus"; + rev = "6146193406b62e942d13d4d43580ed94ac70c218"; + sha256 = "sha256-85STELbFB7QmTaM8GvJNlWvAg6KPAXeYRiMb4cGA6RY="; + }; + + nativeBuildInputs = [ bc ]; + + buildInputs = kernel.moduleBuildDependencies; + + hardeningDisable = [ "pic" ]; + + 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/" + ''; + + 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; [ fortuneteller2k ]; + broken = kernel.isHardened; + }; +} diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 68a9ff02a434..34e5d3ab0ba3 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -20762,6 +20762,8 @@ in r8168 = callPackage ../os-specific/linux/r8168 { }; + rtl8188eus-aircrack = callPackage ../os-specific/linux/rtl8188eus-aircrack { }; + rtl8192eu = callPackage ../os-specific/linux/rtl8192eu { }; rtl8723bs = callPackage ../os-specific/linux/rtl8723bs { };