9 stdenv.mkDerivation rec {
13 src = fetchFromGitHub {
14 owner = "robertdavidgraham";
17 sha256 = "sha256-mnGC/moQANloR5ODwRjzJzBa55OEZ9QU+9WpAHxQE/g=";
20 postPatch = lib.optionalString stdenv.isDarwin ''
21 # Fix broken install command
22 substituteInPlace Makefile --replace "-pm755" "-pDm755"
25 nativeBuildInputs = [ makeWrapper installShellFiles ];
30 "CC=${stdenv.cc.targetPrefix}cc"
33 enableParallelBuilding = true;
36 installManPage doc/masscan.?
38 install -Dm444 -t $out/etc/masscan data/exclude.conf
39 install -Dm444 -t $out/share/doc/masscan doc/*.{html,js,md}
40 install -Dm444 -t $out/share/licenses/masscan LICENSE
42 wrapProgram $out/bin/masscan \
43 --prefix LD_LIBRARY_PATH : "${libpcap}/lib"
46 doInstallCheck = true;
48 installCheckPhase = ''
49 $out/bin/masscan --selftest
53 description = "Fast scan of the Internet";
54 homepage = "https://github.com/robertdavidgraham/masscan";
55 changelog = "https://github.com/robertdavidgraham/masscan/releases/tag/${version}";
56 license = licenses.agpl3Only;
57 platforms = platforms.unix;
58 maintainers = with maintainers; [ rnhmjoj ];