at 17.09-beta 39 lines 1.1 kB view raw
1{ stdenv, fetchurl, libpcap, bash }: 2 3stdenv.mkDerivation rec { 4 name = "p0f-${version}"; 5 version = "3.09b"; 6 7 src = fetchurl { 8 url = "http://lcamtuf.coredump.cx/p0f3/releases/${name}.tgz"; 9 sha256 = "0zqfq3gdnha29ckvlqmyp36c0jhj7f69bhqqx31yb6vkirinhfsl"; 10 }; 11 12 buildInputs = [ libpcap ]; 13 14 buildPhase = '' 15 substituteInPlace config.h --replace "p0f.fp" "$out/etc/p0f.fp" 16 substituteInPlace build.sh --replace "/bin/bash" "${bash}/bin/bash" 17 ./build.sh 18 cd tools && make && cd .. 19 ''; 20 21 installPhase = '' 22 mkdir -p $out/sbin $out/etc 23 24 cp ./p0f $out/sbin 25 cp ./p0f.fp $out/etc 26 27 cp ./tools/p0f-client $out/sbin 28 cp ./tools/p0f-sendsyn $out/sbin 29 cp ./tools/p0f-sendsyn6 $out/sbin 30 ''; 31 32 meta = { 33 description = "Passive network reconnaissance and fingerprinting tool"; 34 homepage = "http://lcamtuf.coredump.cx/p0f3/"; 35 license = stdenv.lib.licenses.lgpl21; 36 platforms = stdenv.lib.platforms.linux; 37 maintainers = [ stdenv.lib.maintainers.thoughtpolice ]; 38 }; 39}