2021-01-17 03:51:22 +00:00
|
|
|
{ lib, stdenv, fetchFromGitHub, cmake, pkg-config, libjson, json_c, gengetopt, flex, byacc, gmp
|
2019-05-06 14:49:46 +01:00
|
|
|
, libpcap
|
|
|
|
}:
|
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
pname = "zmap";
|
|
|
|
version = "2.1.1";
|
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "zmap";
|
|
|
|
repo = pname;
|
|
|
|
rev = "v${version}";
|
|
|
|
sha256 = "0yaahaiawkjk020hvsb8pndbrk8k10wxkfba1irp12a4sj6rywcs";
|
|
|
|
};
|
|
|
|
|
2020-06-18 15:37:56 +01:00
|
|
|
patches = [
|
|
|
|
# fix build with json-c 0.14 https://github.com/zmap/zmap/pull/609
|
|
|
|
./cmake-json-0.14-fix.patch
|
|
|
|
];
|
|
|
|
|
2019-05-06 14:49:46 +01:00
|
|
|
cmakeFlags = [ "-DRESPECT_INSTALL_PREFIX_CONFIG=ON" ];
|
|
|
|
dontUseCmakeBuildDir = true;
|
|
|
|
|
2021-01-17 03:51:22 +00:00
|
|
|
nativeBuildInputs = [ cmake pkg-config gengetopt flex byacc ];
|
2019-05-06 14:49:46 +01:00
|
|
|
buildInputs = [ libjson json_c gmp libpcap ];
|
|
|
|
|
|
|
|
outputs = [ "out" "man" ];
|
|
|
|
|
2021-01-11 07:54:33 +00:00
|
|
|
meta = with lib; {
|
2020-04-01 02:11:51 +01:00
|
|
|
homepage = "https://zmap.io/";
|
2019-05-06 14:49:46 +01:00
|
|
|
license = licenses.asl20;
|
|
|
|
description = "Fast single packet network scanner designed for Internet-wide network surveys";
|
|
|
|
maintainers = with maintainers; [ ma27 ];
|
|
|
|
platforms = platforms.unix;
|
|
|
|
broken = stdenv.isDarwin;
|
|
|
|
};
|
|
|
|
}
|