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

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

37 lines
1003 B
Nix
Raw Normal View History

{ lib, rustPlatform, fetchCrate, nmap, stdenv, Security, perl, python3 }:
2020-08-28 19:04:10 +00:00
rustPlatform.buildRustPackage rec {
pname = "rustscan";
2022-11-09 14:53:19 +00:00
version = "2.1.1";
2020-08-28 19:04:10 +00:00
src = fetchCrate {
inherit pname version;
2022-11-09 14:53:19 +00:00
sha256 = "sha256-yGVhbI1LivTIQEgqOK59T1+8SiTJBPIdftiXkwE4lZM=";
2020-08-28 19:04:10 +00:00
};
2022-11-09 14:53:19 +00:00
cargoSha256 = "sha256-UR3ktV80QU0N3f7qmqdhYpc5uwoPq4UvN40zEuMbp+Q=";
2020-08-28 19:04:10 +00:00
postPatch = ''
substituteInPlace src/scripts/mod.rs \
--replace 'call_format = "nmap' 'call_format = "${nmap}/bin/nmap'
patchShebangs fixtures/.rustscan_scripts/*
2020-08-28 19:04:10 +00:00
'';
2021-01-15 09:19:50 +00:00
buildInputs = lib.optional stdenv.isDarwin Security;
2020-10-26 08:52:56 +00:00
nativeCheckInputs = [ perl python3 ];
# these tests require network access
2020-08-28 19:04:10 +00:00
checkFlags = [
2020-09-21 17:18:14 +00:00
"--skip=parse_correct_host_addresses"
2020-09-29 19:15:33 +00:00
"--skip=parse_hosts_file_and_incorrect_hosts"
2020-08-28 19:04:10 +00:00
];
meta = with lib; {
2020-08-28 19:04:10 +00:00
description = "Faster Nmap Scanning with Rust";
homepage = "https://github.com/RustScan/RustScan";
license = licenses.gpl3Only;
maintainers = with maintainers; [ figsoda ];
2020-08-28 19:04:10 +00:00
};
}