Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)
at devShellTools-shell 53 lines 1.3 kB view raw
1{ 2 lib, 3 stdenv, 4 buildGoModule, 5 fetchFromGitHub, 6 pkg-config, 7 libpcap, 8 libnfnetlink, 9 libnetfilter_queue, 10 libusb1, 11}: 12 13buildGoModule rec { 14 pname = "bettercap"; 15 version = "2.41.1"; 16 17 src = fetchFromGitHub { 18 owner = "bettercap"; 19 repo = "bettercap"; 20 rev = "v${version}"; 21 sha256 = "sha256-NvCAG5+oZ5Xf2gbFKNlLXNxkvvK10py+qksJ5te2aGI="; 22 }; 23 24 vendorHash = "sha256-1kgjMPsj8z2Cl0YWe/1zY0Zuiza0X+ZAIgsMqPhCrMw="; 25 26 doCheck = false; 27 28 nativeBuildInputs = [ pkg-config ]; 29 buildInputs = [ 30 libpcap 31 libusb1 32 ] 33 ++ lib.optionals stdenv.hostPlatform.isLinux [ 34 libnfnetlink 35 libnetfilter_queue 36 ]; 37 38 meta = with lib; { 39 description = "Man in the middle tool"; 40 longDescription = '' 41 BetterCAP is a powerful, flexible and portable tool created to perform various 42 types of MITM attacks against a network, manipulate HTTP, HTTPS and TCP traffic 43 in realtime, sniff for credentials and much more. 44 ''; 45 homepage = "https://www.bettercap.org/"; 46 license = with licenses; [ gpl3Only ]; 47 maintainers = with maintainers; [ y0no ]; 48 mainProgram = "bettercap"; 49 # Broken on darwin for Go toolchain > 1.22, with error: 50 # 'link: golang.org/x/net/internal/socket: invalid reference to syscall.recvmsg' 51 broken = stdenv.hostPlatform.isDarwin; 52 }; 53}