lol
at 15.09-beta 45 lines 1.5 kB view raw
1{ stdenv, fetchurl, libpcap, pkgconfig, openssl 2, graphicalSupport ? false 3, libX11 ? null 4, gtk ? null 5, python ? null 6, pygtk ? null 7, makeWrapper ? null 8, pygobject ? null 9, pycairo ? null 10, pysqlite ? null 11}: 12 13with stdenv.lib; 14stdenv.mkDerivation rec { 15 name = "nmap${optionalString graphicalSupport "-graphical"}-${version}"; 16 version = "6.47"; 17 18 src = fetchurl { 19 url = "http://nmap.org/dist/nmap-${version}.tar.bz2"; 20 sha256 = "14d53aji4was68c01pf105n5ylha257wmdbx40ddiqiw42g1x8cg"; 21 }; 22 23 patches = ./zenmap.patch; 24 25 configureFlags = optionalString (!graphicalSupport) "--without-zenmap"; 26 27 postInstall = '' 28 wrapProgram $out/bin/ndiff --prefix PYTHONPATH : "$(toPythonPath $out)" --prefix PYTHONPATH : "$PYTHONPATH" 29 '' + optionalString graphicalSupport '' 30 wrapProgram $out/bin/zenmap --prefix PYTHONPATH : "$(toPythonPath $out)" --prefix PYTHONPATH : "$PYTHONPATH" --prefix PYTHONPATH : $(toPythonPath ${pygtk})/gtk-2.0 --prefix PYTHONPATH : $(toPythonPath ${pygobject})/gtk-2.0 --prefix PYTHONPATH : $(toPythonPath ${pycairo})/gtk-2.0 31 ''; 32 33 buildInputs = [ libpcap pkgconfig openssl makeWrapper python ] 34 ++ optionals graphicalSupport [ 35 libX11 gtk pygtk pysqlite pygobject pycairo 36 ]; 37 38 meta = { 39 description = "A free and open source utility for network discovery and security auditing"; 40 homepage = http://www.nmap.org; 41 license = licenses.gpl2; 42 platforms = platforms.all; 43 maintainers = with maintainers; [ mornfall thoughtpolice ]; 44 }; 45}