diff --git a/pkgs/tools/networking/mdk4/default.nix b/pkgs/tools/networking/mdk4/default.nix new file mode 100644 index 000000000000..903504633ac8 --- /dev/null +++ b/pkgs/tools/networking/mdk4/default.nix @@ -0,0 +1,33 @@ +{ lib, stdenv, fetchFromGitHub, libnl, libpcap, pkg-config }: + +stdenv.mkDerivation { + pname = "mdk4"; + version = "unstable-2021-04-27"; + + src = fetchFromGitHub { + owner = "aircrack-ng"; + repo = "mdk4"; + rev = "e94422ce8e4b8dcd132d658345814df7e63bfa41"; + sha256 = "sha256-pZS7HQBKlSZJGqoZlSyBUzXC3osswcB56cBzgm+Sbwg="; + }; + + preBuild = '' + mkdir -p $out/bin + mkdir -p $out/share/man + + substituteInPlace src/Makefile --replace '/usr/local/src/mdk4' '$out' + ''; + + nativeBuildInputs = [ pkg-config ]; + + buildInputs = [ libnl libpcap ]; + + makeFlags = [ "PREFIX=$(out)" "SBINDIR=$(PREFIX)/bin" ]; + + meta = with lib; { + description = "A tool that injects data into wireless networks"; + homepage = "https://github.com/aircrack-ng/mdk4"; + maintainers = with maintainers; [ fortuneteller2k ]; + license = licenses.gpl2Plus; + }; +} diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index a8f24ecbd561..1d8c674364f3 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -6757,6 +6757,8 @@ in mdk = callPackage ../development/tools/mdk { }; + mdk4 = callPackage ../tools/networking/mdk4 { }; + mdp = callPackage ../applications/misc/mdp { }; mednafen = callPackage ../misc/emulators/mednafen { };