diff options
author | Michele Guerini Rocco <rnhmjoj@users.noreply.github.com> | 2021-09-29 10:14:03 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-09-29 10:14:03 +0200 |
commit | 03871bd03af955ba7752106508f721fb18648b19 (patch) | |
tree | a320266a7f35057920a9c8fdfc5bf4ea3e561b52 /pkgs/tools | |
parent | ab0ec63be64f9cf4ec5e84aa69cc5351dd1ec338 (diff) | |
parent | 11175a4c8b0ea4a87905445f1fcbf52b8a184bec (diff) |
Merge pull request #139848 from peterhoeg/f/masscan
masscan: enable selftest and minor cleanups
Diffstat (limited to 'pkgs/tools')
-rw-r--r-- | pkgs/tools/security/masscan/default.nix | 28 |
1 files changed, 17 insertions, 11 deletions
diff --git a/pkgs/tools/security/masscan/default.nix b/pkgs/tools/security/masscan/default.nix index 891311ddaa03a..46bae3c20c51a 100644 --- a/pkgs/tools/security/masscan/default.nix +++ b/pkgs/tools/security/masscan/default.nix @@ -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.? + + 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 - mkdir -p $out/share/{doc,licenses}/masscan - mkdir -p $out/etc/masscan + wrapProgram $out/bin/masscan \ + --prefix LD_LIBRARY_PATH : "${libpcap}/lib" + ''; - 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 + doInstallCheck = true; - wrapProgram $out/bin/masscan --prefix LD_LIBRARY_PATH : "${libpcap}/lib" + installCheckPhase = '' + $out/bin/masscan --selftest ''; meta = with lib; { |