aircrack-ng: wrap airmon-ng with needed tools

Fixes #9901
This commit is contained in:
Dmitry Moskowski 2018-01-04 01:30:15 +00:00 committed by Orivej Desh
parent bc7f0162f5
commit 7920785860

View File

@ -1,4 +1,5 @@
{ stdenv, fetchurl, libpcap, openssl, zlib, wirelesstools, libnl, pkgconfig }:
{ stdenv, fetchurl, libpcap, openssl, zlib, wirelesstools
, iw, ethtool, pciutils, libnl, pkgconfig, makeWrapper }:
stdenv.mkDerivation rec {
name = "aircrack-ng-1.2-rc4";
@ -8,13 +9,19 @@ stdenv.mkDerivation rec {
sha256 = "0dpzx9kddxpgzmgvdpl3rxn0jdaqhm5wxxndp1xd7d75mmmc2fnr";
};
nativeBuildInputs = [ pkgconfig ];
buildInputs = [ libpcap openssl zlib libnl ];
nativeBuildInputs = [ pkgconfig makeWrapper ];
buildInputs = [ libpcap openssl zlib libnl iw ethtool pciutils ];
patchPhase = ''
sed -e 's@^prefix.*@prefix = '$out@ -i common.mak
sed -e 's@/usr/local/bin@'${wirelesstools}@ -i src/osdep/linux.c
'';
'';
postFixup = ''
wrapProgram $out/bin/airmon-ng --prefix PATH : ${stdenv.lib.makeBinPath [
ethtool iw pciutils
]}
'';
meta = with stdenv.lib; {
description = "Wireless encryption cracking tools";