2021-01-11 08:54:33 +01:00
|
|
|
{ lib, stdenv, fetchFromGitHub, rustPlatform, nmap, Security }:
|
2020-08-28 21:04:10 +02:00
|
|
|
|
|
|
|
rustPlatform.buildRustPackage rec {
|
|
|
|
pname = "rustscan";
|
2020-11-24 17:43:44 +01:00
|
|
|
version = "2.0.1";
|
2020-08-28 21:04:10 +02:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "RustScan";
|
|
|
|
repo = pname;
|
2020-11-01 23:39:49 +01:00
|
|
|
rev = version;
|
2020-11-24 17:43:44 +01:00
|
|
|
sha256 = "0fdbsz1v7bb5dm3zqjs1qf73lb1m4qzkqyb3h3hbyrp9vklgxsgw";
|
2020-08-28 21:04:10 +02:00
|
|
|
};
|
|
|
|
|
2021-05-07 13:00:49 +02:00
|
|
|
cargoSha256 = "0658jbx59qrsgpfczzlfrbp2qm7kh0c5561bsxzmgiri7fcz9w0n";
|
2020-08-28 21:04:10 +02:00
|
|
|
|
|
|
|
postPatch = ''
|
|
|
|
substituteInPlace src/main.rs \
|
|
|
|
--replace 'Command::new("nmap")' 'Command::new("${nmap}/bin/nmap")'
|
|
|
|
'';
|
|
|
|
|
2021-01-15 10:19:50 +01:00
|
|
|
buildInputs = lib.optional stdenv.isDarwin Security;
|
2020-10-26 09:52:56 +01:00
|
|
|
|
2020-08-28 21:04:10 +02:00
|
|
|
checkFlags = [
|
|
|
|
"--skip=infer_ulimit_lowering_no_panic"
|
|
|
|
"--skip=google_dns_runs"
|
2020-09-21 19:18:14 +02:00
|
|
|
"--skip=parse_correct_host_addresses"
|
2020-09-29 21:15:33 +02:00
|
|
|
"--skip=parse_hosts_file_and_incorrect_hosts"
|
2020-11-24 17:43:44 +01:00
|
|
|
"--skip=run_perl_script"
|
|
|
|
"--skip=run_python_script"
|
2020-08-28 21:04:10 +02:00
|
|
|
];
|
|
|
|
|
2021-01-11 08:54:33 +01:00
|
|
|
meta = with lib; {
|
2020-08-28 21:04:10 +02:00
|
|
|
description = "Faster Nmap Scanning with Rust";
|
|
|
|
homepage = "https://github.com/RustScan/RustScan";
|
|
|
|
license = licenses.gpl3Only;
|
|
|
|
maintainers = [ maintainers.SuperSandro2000 ];
|
|
|
|
};
|
|
|
|
}
|