summary refs log tree commit diff
path: root/pkgs/tools/security/rustscan/default.nix
diff options
context:
space:
mode:
authorSandro Jäckel <sandro.jaeckel@gmail.com>2020-08-28 21:04:10 +0200
committerDaniël de Kok <me@danieldk.eu>2020-08-29 17:34:49 +0200
commit50f728ece35ad0731311dd35fd92915eaf49f9fd (patch)
tree0f6ebb8a4b587aa98c124eb5e0158a63f74ff52b /pkgs/tools/security/rustscan/default.nix
parent0fcebc338d0de2aecaaed28acb47abf6d696cb8f (diff)
downloadnixpkgs-50f728ece35ad0731311dd35fd92915eaf49f9fd.tar
nixpkgs-50f728ece35ad0731311dd35fd92915eaf49f9fd.tar.gz
nixpkgs-50f728ece35ad0731311dd35fd92915eaf49f9fd.tar.bz2
nixpkgs-50f728ece35ad0731311dd35fd92915eaf49f9fd.tar.lz
nixpkgs-50f728ece35ad0731311dd35fd92915eaf49f9fd.tar.xz
nixpkgs-50f728ece35ad0731311dd35fd92915eaf49f9fd.tar.zst
nixpkgs-50f728ece35ad0731311dd35fd92915eaf49f9fd.zip
rustscan: init at 1.8.0
Diffstat (limited to 'pkgs/tools/security/rustscan/default.nix')
-rw-r--r--pkgs/tools/security/rustscan/default.nix37
1 files changed, 37 insertions, 0 deletions
diff --git a/pkgs/tools/security/rustscan/default.nix b/pkgs/tools/security/rustscan/default.nix
new file mode 100644
index 00000000000..2a2e8c7ec6c
--- /dev/null
+++ b/pkgs/tools/security/rustscan/default.nix
@@ -0,0 +1,37 @@
+{ lib
+, fetchFromGitHub
+, rustPlatform
+, nmap
+}:
+
+rustPlatform.buildRustPackage rec {
+  pname = "rustscan";
+  version = "1.8.0";
+
+  src = fetchFromGitHub {
+    owner = "RustScan";
+    repo = pname;
+    rev = "${version}";
+    sha256 = "0rkqsh4i58cf18ad97yr4f68s5jg6z0ybz4bw8607lz7cjkfvjay";
+  };
+
+  cargoSha256 = "0mj214f2md7kjknmcayc5dcfmlk2b8mqkn7kxzdis8qv9a5xcbk8";
+
+  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"
+    "--skip=parse_correct_ips_or_hosts"
+  ];
+
+  meta = with lib; {
+    description = "Faster Nmap Scanning with Rust";
+    homepage = "https://github.com/RustScan/RustScan";
+    license = licenses.gpl3Only;
+    maintainers = [ maintainers.SuperSandro2000 ];
+  };
+}