acr-cli: init at 0.14 (#359508)
[NixPkgs.git] / pkgs / by-name / ye / yersinia / package.nix
blobcc17452a96924260fd493b377c1424efded4891e
1 { stdenv, lib, fetchFromGitHub, autoreconfHook, pkg-config
2 , ncurses, libpcap, libnet
3 # alpha version of GTK interface
4 , withGtk ? false, gtk2
5 # enable remote admin interface
6 , enableAdmin ? false
7 }:
9 stdenv.mkDerivation rec {
10   pname = "yersinia";
11   version = "unstable-2022-11-20";
13   src = fetchFromGitHub {
14     owner = "tomac";
15     repo = pname;
16     rev = "867b309eced9e02b63412855440cd4f5f7727431";
17     sha256 = "sha256-VShg9Nzd8dzUNiqYnKcDzRgqjwar/8XRGEJCJL25aR0=";
18   };
20   nativeBuildInputs = [ autoreconfHook pkg-config ];
21   buildInputs = [ libpcap libnet ncurses ]
22     ++ lib.optional withGtk gtk2;
24   autoreconfPhase = "./autogen.sh";
26   configureFlags = [
27     "--with-pcap-includes=${libpcap}/include"
28     "--with-libnet-includes=${libnet}/include"
29   ]
30   ++ lib.optional (!enableAdmin) "--disable-admin"
31   ++ lib.optional (!withGtk) "--disable-gtk";
33   makeFlags = [ "LDFLAGS=-lncurses" ];
35   meta = with lib; {
36     description = "Framework for layer 2 attacks";
37     mainProgram = "yersinia";
38     homepage = "https://github.com/tomac/yersinia";
39     license = licenses.gpl2Plus;
40     maintainers = with maintainers; [ vdot0x23 ];
41     # INSTALL and FAQ in this package seem a little outdated
42     # so not sure, but it could work on openbsd, illumos, and freebsd
43     # if you have a machine to test with, feel free to add these
44     platforms = with platforms; linux;
45   };