lol
0
fork

Configure Feed

Select the types of activity you want to include in your feed.

at 22.05-pre 41 lines 1.3 kB view raw
1{ lib, stdenv, fetchFromGitHub, libpcap, withTcl ? true, tcl }: 2 3stdenv.mkDerivation rec { 4 pname = "hping"; 5 version = "2014-12-26"; 6 7 src = fetchFromGitHub { 8 owner = "antirez"; 9 repo = pname; 10 rev = "3547c7691742c6eaa31f8402e0ccbb81387c1b99"; # there are no tags/releases 11 sha256 = "0y0n1ybij3yg9lfgzcwfmjz1sjg913zcqrv391xx83dm0j80sdpb"; 12 }; 13 14 buildInputs = [ libpcap ] ++ lib.optional withTcl tcl; 15 16 postPatch = '' 17 substituteInPlace Makefile.in --replace "gcc" "$CC" 18 substituteInPlace version.c --replace "RELEASE_DATE" "\"$version\"" 19 '' + lib.optionalString stdenv.isLinux '' 20 sed -i -e 's|#include <net/bpf.h>|#include <pcap/bpf.h>|' \ 21 libpcap_stuff.c script.c 22 ''; 23 24 configureFlags = [ (if withTcl then "TCLSH=${tcl}/bin/tclsh" else "--no-tcl") ]; 25 26 installPhase = '' 27 install -Dm755 hping3 -t $out/sbin 28 ln -s $out/sbin/hping3 $out/sbin/hping 29 ln -s $out/sbin/hping3 $out/sbin/hping2 30 install -Dm644 docs/hping3.8 -t $out/share/man/man8 31 ln -s hping3.8.gz $out/share/man/man8/hping.8.gz 32 ln -s hping3.8.gz $out/share/man/man8/hping2.8.gz 33 ''; 34 35 meta = with lib; { 36 description = "A command-line oriented TCP/IP packet assembler/analyzer"; 37 homepage = "http://www.hping.org/"; 38 license = licenses.gpl2Only; 39 platforms = platforms.unix; 40 }; 41}