nixpkgs/pkgs/tools/security/rustscan/default.nix

39 lines
1.0 KiB
Nix
Raw Normal View History

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