forked from mirrors/nixpkgs
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
51 lines
1.6 KiB
Nix
51 lines
1.6 KiB
Nix
{ lib, stdenv, fetchFromGitHub, cmake, libpcap, libnet, zlib, curl, pcre
|
|
, openssl, ncurses, glib, gtk3, atk, pango, flex, bison, geoip, harfbuzz
|
|
, pkgconfig }:
|
|
|
|
stdenv.mkDerivation rec {
|
|
pname = "ettercap";
|
|
version = "0.8.3.1";
|
|
|
|
src = fetchFromGitHub {
|
|
owner = "Ettercap";
|
|
repo = "ettercap";
|
|
rev = "v${version}";
|
|
sha256 = "1sdf1ssa81ib6k0mc5m2jzbjl4jd1yv6ahv5dwx2x9w4b2pyqg1c";
|
|
};
|
|
|
|
strictDeps = true;
|
|
nativeBuildInputs = [ cmake flex bison pkgconfig ];
|
|
buildInputs = [
|
|
libpcap libnet zlib curl pcre openssl ncurses
|
|
glib gtk3 atk pango geoip harfbuzz
|
|
];
|
|
|
|
preConfigure = ''
|
|
substituteInPlace CMakeLists.txt --replace /etc \$\{INSTALL_PREFIX\}/etc \
|
|
--replace /usr \$\{INSTALL_PREFIX\}
|
|
'';
|
|
|
|
cmakeFlags = [
|
|
"-DBUNDLED_LIBS=Off"
|
|
"-DGTK3_GLIBCONFIG_INCLUDE_DIR=${glib.out}/lib/glib-2.0/include"
|
|
];
|
|
|
|
# TODO: Remove after the next release (0.8.4 should work without this):
|
|
NIX_CFLAGS_COMPILE = [ "-I${harfbuzz.dev}/include/harfbuzz" ];
|
|
|
|
meta = with lib; {
|
|
description = "Comprehensive suite for man in the middle attacks";
|
|
longDescription = ''
|
|
Ettercap is a comprehensive suite for man in the middle attacks. It
|
|
features sniffing of live connections, content filtering on the fly and
|
|
many other interesting tricks. It supports active and passive dissection
|
|
of many protocols and includes many features for network and host
|
|
analysis.
|
|
'';
|
|
homepage = "https://www.ettercap-project.org/";
|
|
license = licenses.gpl2;
|
|
platforms = platforms.unix;
|
|
maintainers = with maintainers; [ pSub ];
|
|
};
|
|
}
|