Merge pull request #61048 from Ma27/zmap-package

zmap: init at 2.1.1
This commit is contained in:
worldofpeace 2019-05-10 15:19:43 -04:00 committed by GitHub
commit 6c8bb26331
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
5 changed files with 61 additions and 0 deletions

View File

@ -144,6 +144,7 @@
./programs/xonsh.nix
./programs/xss-lock.nix
./programs/yabar.nix
./programs/zmap.nix
./programs/zsh/oh-my-zsh.nix
./programs/zsh/zsh.nix
./programs/zsh/zsh-autoenv.nix

View File

@ -0,0 +1,18 @@
{ pkgs, config, lib, ... }:
with lib;
let
cfg = config.programs.zmap;
in {
options.programs.zmap = {
enable = mkEnableOption "ZMap";
};
config = mkIf cfg.enable {
environment.systemPackages = [ pkgs.zmap ];
environment.etc."zmap/blacklist.conf".source = "${pkgs.zmap}/etc/zmap/blacklist.conf";
environment.etc."zmap/zmap.conf".source = "${pkgs.zmap}/etc/zmap.conf";
};
}

View File

@ -12,8 +12,16 @@ stdenv.mkDerivation rec {
sha256 = "173l9yai5yndbyn8nzdl6q11wv4x959bd0w392i82nfsqcz0pfsv";
};
configureFlags = [
"--program-transform-name='s,^,b,'"
];
doCheck = true;
postInstall = ''
ln -s $out/bin/byacc $out/bin/yacc
'';
meta = with stdenv.lib; {
description = "Berkeley YACC";
homepage = https://invisible-island.net/byacc/byacc.html;

View File

@ -0,0 +1,32 @@
{ stdenv, fetchFromGitHub, cmake, pkgconfig, libjson, json_c, gengetopt, flex, byacc, gmp
, libpcap
}:
stdenv.mkDerivation rec {
pname = "zmap";
version = "2.1.1";
src = fetchFromGitHub {
owner = "zmap";
repo = pname;
rev = "v${version}";
sha256 = "0yaahaiawkjk020hvsb8pndbrk8k10wxkfba1irp12a4sj6rywcs";
};
cmakeFlags = [ "-DRESPECT_INSTALL_PREFIX_CONFIG=ON" ];
dontUseCmakeBuildDir = true;
nativeBuildInputs = [ cmake pkgconfig gengetopt flex byacc ];
buildInputs = [ libjson json_c gmp libpcap ];
outputs = [ "out" "man" ];
meta = with stdenv.lib; {
homepage = https://zmap.io/;
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;
};
}

View File

@ -6845,6 +6845,8 @@ in
zxing = callPackage ../tools/graphics/zxing {};
zmap = callPackage ../tools/security/zmap { };
### SHELLS