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

38 lines
861 B
Nix
Raw Normal View History

2020-08-28 21:04:10 +02:00
{ lib
, fetchFromGitHub
, rustPlatform
, nmap
}:
rustPlatform.buildRustPackage rec {
pname = "rustscan";
2020-09-21 19:18:14 +02:00
version = "1.9.0";
2020-08-28 21:04:10 +02:00
src = fetchFromGitHub {
owner = "RustScan";
repo = pname;
rev = "${version}";
2020-09-21 19:18:14 +02:00
sha256 = "0hj7k3yrd5vwxarn1kmxlhj5xlcg71w0vrzgnyrzbcppfxrbrj1m";
2020-08-28 21:04:10 +02:00
};
2020-09-21 19:18:14 +02:00
cargoSha256 = "0cknnhzkk7jyi436c4hxif455xxdwg9pc4kw1q1wmgnqdw340xin";
2020-08-28 21:04:10 +02:00
postPatch = ''
substituteInPlace src/main.rs \
--replace 'Command::new("nmap")' 'Command::new("${nmap}/bin/nmap")'
'';
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-08-28 21:04:10 +02:00
];
meta = with lib; {
description = "Faster Nmap Scanning with Rust";
homepage = "https://github.com/RustScan/RustScan";
license = licenses.gpl3Only;
maintainers = [ maintainers.SuperSandro2000 ];
};
}