biome: 1.9.2 -> 1.9.3
[NixPkgs.git] / pkgs / tools / security / rustscan / default.nix
blob6af9b974ac0908a7288c8a32acc401122be74ffd
2   lib,
3   stdenv,
4   fetchFromGitHub,
5   nmap,
6   perl,
7   python3,
8   rustPlatform,
9   Security,
12 rustPlatform.buildRustPackage rec {
13   pname = "rustscan";
14   version = "2.3.0";
16   src = fetchFromGitHub {
17     owner = "RustScan";
18     repo = "RustScan";
19     rev = "refs/tags/${version}";
20     hash = "sha256-6heC/bHo4IqKNvPjch7AiyWTCZDCv4MZHC7DTEX3U5c=";
21   };
23   cargoHash = "sha256-Fr+m4BeYvUOoSkewwdUgpmdNchweeLK7v/tKLEzFOBs=";
25   postPatch = ''
26     substituteInPlace src/scripts/mod.rs \
27       --replace-fail 'call_format = "nmap' 'call_format = "${nmap}/bin/nmap'
28     patchShebangs fixtures/.rustscan_scripts/*
29   '';
31   buildInputs = lib.optional stdenv.hostPlatform.isDarwin Security;
33   nativeCheckInputs = [
34     perl
35     python3
36   ];
38   checkFlags = [
39     # These tests require network access
40     "--skip=parse_correct_host_addresses"
41     "--skip=parse_hosts_file_and_incorrect_hosts"
42     "--skip=resolver_args_google_dns"
43     "--skip=resolver_default_cloudflare"
44   ];
46   meta = with lib; {
47     description = "Faster Nmap Scanning with Rust";
48     homepage = "https://github.com/RustScan/RustScan";
49     changelog = "https://github.com/RustScan/RustScan/releases/tag/${version}";
50     license = licenses.gpl3Only;
51     maintainers = with maintainers; [ figsoda ];
52     mainProgram = "rustscan";
53   };