4a7f99d55d
Part of: https://github.com/NixOS/nixpkgs/issues/108938 meta = with stdenv.lib; is a widely used pattern. We want to slowly remove the `stdenv.lib` indirection and encourage people to use `lib` directly. Thus let’s start with the meta field. This used a rewriting script to mostly automatically replace all occurances of this pattern, and add the `lib` argument to the package header if it doesn’t exist yet. The script in its current form is available at https://cs.tvl.fyi/depot@2f807d7f141068d2d60676a89213eaa5353ca6e0/-/blob/users/Profpatsch/nixpkgs-rewriter/default.nix
34 lines
978 B
Nix
34 lines
978 B
Nix
{ lib, stdenv, fetchurl, libpcap, openssl, zlib, wirelesstools
|
|
, iw, ethtool, pciutils, libnl, pkgconfig, makeWrapper
|
|
, autoreconfHook, usbutils }:
|
|
|
|
stdenv.mkDerivation rec {
|
|
name = "aircrack-ng-1.6";
|
|
|
|
src = fetchurl {
|
|
url = "https://download.aircrack-ng.org/${name}.tar.gz";
|
|
sha256 = "0ix2k64qg7x3w0bzdsbk1m50kcpq1ws59g3zkwiafvpwdr4gs2sg";
|
|
};
|
|
|
|
nativeBuildInputs = [ pkgconfig makeWrapper autoreconfHook ];
|
|
buildInputs = [ libpcap openssl zlib libnl iw ethtool pciutils ];
|
|
|
|
patchPhase = ''
|
|
sed -e 's@/usr/local/bin@'${wirelesstools}@ -i lib/osdep/linux.c
|
|
'';
|
|
|
|
postFixup = ''
|
|
wrapProgram $out/bin/airmon-ng --prefix PATH : ${stdenv.lib.makeBinPath [
|
|
ethtool iw pciutils usbutils
|
|
]}
|
|
'';
|
|
|
|
meta = with lib; {
|
|
description = "Wireless encryption cracking tools";
|
|
homepage = "http://www.aircrack-ng.org/";
|
|
license = licenses.gpl2Plus;
|
|
maintainers = with maintainers; [ domenkozar ];
|
|
platforms = platforms.linux;
|
|
};
|
|
}
|