Merge pull request #139848 from peterhoeg/f/masscan

masscan: enable selftest and minor cleanups
This commit is contained in:
Michele Guerini Rocco 2021-09-29 10:14:03 +02:00 committed by GitHub
commit 03871bd03a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -19,23 +19,29 @@ stdenv.mkDerivation rec {
nativeBuildInputs = [ makeWrapper installShellFiles ];
makeFlags = [ "PREFIX=$(out)" "GITVER=${version}" "CC=${stdenv.cc.targetPrefix}cc" ];
makeFlags = [
"PREFIX=$(out)"
"GITVER=${version}"
"CC=${stdenv.cc.targetPrefix}cc"
];
preInstall = ''
mkdir -p $out/bin
'';
enableParallelBuilding = true;
postInstall = ''
installManPage doc/masscan.8
installManPage doc/masscan.?
mkdir -p $out/share/{doc,licenses}/masscan
mkdir -p $out/etc/masscan
install -Dm444 -t $out/etc/masscan data/exclude.conf
install -Dm444 -t $out/share/doc/masscan doc/*.{html,js,md}
install -Dm444 -t $out/share/licenses/masscan LICENSE
cp data/exclude.conf $out/etc/masscan
cp -t $out/share/doc/masscan doc/algorithm.js doc/howto-afl.md doc/bot.html
cp LICENSE $out/share/licenses/masscan/LICENSE
wrapProgram $out/bin/masscan \
--prefix LD_LIBRARY_PATH : "${libpcap}/lib"
'';
wrapProgram $out/bin/masscan --prefix LD_LIBRARY_PATH : "${libpcap}/lib"
doInstallCheck = true;
installCheckPhase = ''
$out/bin/masscan --selftest
'';
meta = with lib; {