2020-10-27 00:29:36 +00:00
|
|
|
{ stdenv, fetchFromGitHub, rustPlatform, nmap, Security }:
|
2020-09-25 04:45:31 +00:00
|
|
|
|
|
|
|
rustPlatform.buildRustPackage rec {
|
|
|
|
pname = "rustscan";
|
2020-10-19 23:25:03 +00:00
|
|
|
version = "1.10.1";
|
2020-09-25 04:45:31 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "RustScan";
|
|
|
|
repo = pname;
|
2020-11-03 02:18:15 +00:00
|
|
|
rev = version;
|
2020-10-19 23:25:03 +00:00
|
|
|
sha256 = "0dhy7b73ipsxsr7wlc3r5yy39i3cjrdszhsw9xwjj31692s3b605";
|
2020-09-25 04:45:31 +00:00
|
|
|
};
|
|
|
|
|
2020-10-19 23:25:03 +00:00
|
|
|
cargoSha256 = "00s1iv8yw06647ijw9p3l5n7d899gsks5j8ljag6ha7hgl5vs4ci";
|
2020-09-25 04:45:31 +00:00
|
|
|
|
|
|
|
postPatch = ''
|
|
|
|
substituteInPlace src/main.rs \
|
|
|
|
--replace 'Command::new("nmap")' 'Command::new("${nmap}/bin/nmap")'
|
|
|
|
'';
|
|
|
|
|
2020-10-27 00:29:36 +00:00
|
|
|
buildInputs = stdenv.lib.optional stdenv.isDarwin Security;
|
|
|
|
|
2020-09-25 04:45:31 +00:00
|
|
|
checkFlags = [
|
|
|
|
"--skip=infer_ulimit_lowering_no_panic"
|
|
|
|
"--skip=google_dns_runs"
|
2020-10-19 23:25:03 +00:00
|
|
|
"--skip=parse_correct_host_addresses"
|
|
|
|
"--skip=parse_hosts_file_and_incorrect_hosts"
|
2020-09-25 04:45:31 +00:00
|
|
|
];
|
|
|
|
|
2020-10-27 00:29:36 +00:00
|
|
|
meta = with stdenv.lib; {
|
2020-09-25 04:45:31 +00:00
|
|
|
description = "Faster Nmap Scanning with Rust";
|
|
|
|
homepage = "https://github.com/RustScan/RustScan";
|
|
|
|
license = licenses.gpl3Only;
|
|
|
|
maintainers = [ maintainers.SuperSandro2000 ];
|
|
|
|
};
|
|
|
|
}
|