nixpkgs-suyu/pkgs/tools/security/masscan/default.nix

44 lines
1.2 KiB
Nix
Raw Normal View History

{ lib, stdenv, fetchFromGitHub, makeWrapper, libpcap }:
2017-02-04 18:10:37 +01:00
stdenv.mkDerivation rec {
pname = "masscan";
2021-02-01 22:14:53 +01:00
version = "1.3.2";
2017-02-04 18:10:37 +01:00
src = fetchFromGitHub {
owner = "robertdavidgraham";
repo = "masscan";
rev = version;
2021-02-01 22:14:53 +01:00
sha256 = "sha256-mnGC/moQANloR5ODwRjzJzBa55OEZ9QU+9WpAHxQE/g=";
2017-02-04 18:10:37 +01:00
};
2018-03-21 21:42:06 +01:00
nativeBuildInputs = [ makeWrapper ];
2017-02-04 18:10:37 +01:00
2018-03-21 21:42:06 +01:00
makeFlags = [ "PREFIX=$(out)" "GITVER=${version}" "CC=cc" ];
preInstall = ''
mkdir -p $out/bin
'';
2017-02-04 18:10:37 +01:00
postInstall = ''
mkdir -p $out/share/man/man8
mkdir -p $out/share/{doc,licenses}/masscan
mkdir -p $out/etc/masscan
cp data/exclude.conf $out/etc/masscan
2018-09-03 15:34:30 +02:00
cp -t $out/share/doc/masscan doc/algorithm.js doc/howto-afl.md doc/bot.html
2017-02-04 18:10:37 +01:00
cp doc/masscan.8 $out/share/man/man8/masscan.8
cp LICENSE $out/share/licenses/masscan/LICENSE
2017-11-05 18:15:53 +01:00
wrapProgram $out/bin/masscan --prefix LD_LIBRARY_PATH : "${libpcap}/lib"
2017-02-04 18:10:37 +01:00
'';
meta = with lib; {
2017-02-04 18:10:37 +01:00
description = "Fast scan of the Internet";
homepage = "https://github.com/robertdavidgraham/masscan";
changelog = "https://github.com/robertdavidgraham/masscan/releases/tag/${version}";
license = licenses.agpl3Only;
platforms = platforms.unix;
2017-02-04 18:10:37 +01:00
maintainers = with maintainers; [ rnhmjoj ];
};
}