2022-09-22 12:36:57 +00:00
|
|
|
{ lib, rustPlatform, fetchCrate, nmap, stdenv, Security, perl, python3 }:
|
2020-09-25 04:45:31 +00:00
|
|
|
|
|
|
|
rustPlatform.buildRustPackage rec {
|
|
|
|
pname = "rustscan";
|
2022-09-22 12:36:57 +00:00
|
|
|
version = "2.1.0";
|
2020-09-25 04:45:31 +00:00
|
|
|
|
2022-09-22 12:36:57 +00:00
|
|
|
src = fetchCrate {
|
|
|
|
inherit pname version;
|
|
|
|
sha256 = "sha256-f9QFsVGGKoWqZGIg8Z8FgZGcUo5M8MFNUavK69SgHkg=";
|
2020-09-25 04:45:31 +00:00
|
|
|
};
|
|
|
|
|
2022-09-22 12:36:57 +00:00
|
|
|
cargoSha256 = "sha256-ZoDE7SJ6snWTFvYXHZdVCC6UCug2wGghH93FfDTDsv0=";
|
2020-09-25 04:45:31 +00:00
|
|
|
|
|
|
|
postPatch = ''
|
2022-09-22 12:36:57 +00:00
|
|
|
substituteInPlace src/scripts/mod.rs \
|
|
|
|
--replace 'call_format = "nmap' 'call_format = "${nmap}/bin/nmap'
|
|
|
|
patchShebangs fixtures/.rustscan_scripts/*
|
2020-09-25 04:45:31 +00:00
|
|
|
'';
|
|
|
|
|
2021-01-15 22:18:51 +00:00
|
|
|
buildInputs = lib.optional stdenv.isDarwin Security;
|
2020-10-27 00:29:36 +00:00
|
|
|
|
2022-09-22 12:36:57 +00:00
|
|
|
checkInputs = [ perl python3 ];
|
|
|
|
|
|
|
|
# these tests require network access
|
2020-09-25 04:45:31 +00:00
|
|
|
checkFlags = [
|
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
|
|
|
];
|
|
|
|
|
2021-01-15 22:18:51 +00:00
|
|
|
meta = with lib; {
|
2020-09-25 04:45:31 +00:00
|
|
|
description = "Faster Nmap Scanning with Rust";
|
|
|
|
homepage = "https://github.com/RustScan/RustScan";
|
|
|
|
license = licenses.gpl3Only;
|
2022-09-22 12:36:57 +00:00
|
|
|
maintainers = with maintainers; [ figsoda ];
|
2020-09-25 04:45:31 +00:00
|
|
|
};
|
|
|
|
}
|