about summary refs log tree commit diff
path: root/pkgs/tools/security
diff options
context:
space:
mode:
authorFabian Affolter <fabian@affolter-engineering.ch>2024-04-28 18:29:25 +0200
committerGitHub <noreply@github.com>2024-04-28 18:29:25 +0200
commit8bc49b5bacc131f5ba6cf6eeb7525f708e58f50a (patch)
treea84ed23a1398754c68fbc378276083af77ca879d /pkgs/tools/security
parent838a36815349a58d645f20d6497612e5879fa236 (diff)
parent948a518ccb76b3d529ea6c052a1c7860ce08cc04 (diff)
Merge pull request #307314 from fabaff/rustscan-bump
rustscan: 2.1.1 -> 2.2.2
Diffstat (limited to 'pkgs/tools/security')
-rw-r--r--pkgs/tools/security/rustscan/default.nix35
1 files changed, 25 insertions, 10 deletions
diff --git a/pkgs/tools/security/rustscan/default.nix b/pkgs/tools/security/rustscan/default.nix
index 5189b7c882b73..238fa8fcc5e33 100644
--- a/pkgs/tools/security/rustscan/default.nix
+++ b/pkgs/tools/security/rustscan/default.nix
@@ -1,37 +1,52 @@
-{ lib, rustPlatform, fetchCrate, nmap, stdenv, Security, perl, python3 }:
+{
+  lib,
+  stdenv,
+  fetchFromGitHub,
+  nmap,
+  perl,
+  python3,
+  rustPlatform,
+  Security,
+}:
 
 rustPlatform.buildRustPackage rec {
   pname = "rustscan";
-  version = "2.1.1";
+  version = "2.2.2";
 
-  src = fetchCrate {
-    inherit pname version;
-    sha256 = "sha256-yGVhbI1LivTIQEgqOK59T1+8SiTJBPIdftiXkwE4lZM=";
+  src = fetchFromGitHub {
+    owner = "RustScan";
+    repo = "RustScan";
+    rev = "refs/tags/${version}";
+    hash = "sha256-67XNEKzR72NOYlPbz2E9yf+THa1XN6muFJG2/iJa8AU=";
   };
 
-  cargoSha256 = "sha256-UR3ktV80QU0N3f7qmqdhYpc5uwoPq4UvN40zEuMbp+Q=";
+  cargoHash = "sha256-U9Kn9xAG+emyi8cWUCNP32z7f19MK8AGgGR6vFJd62Q=";
 
   postPatch = ''
     substituteInPlace src/scripts/mod.rs \
-      --replace 'call_format = "nmap' 'call_format = "${nmap}/bin/nmap'
+      --replace-fail 'call_format = "nmap' 'call_format = "${nmap}/bin/nmap'
     patchShebangs fixtures/.rustscan_scripts/*
   '';
 
   buildInputs = lib.optional stdenv.isDarwin Security;
 
-  nativeCheckInputs = [ perl python3 ];
+  nativeCheckInputs = [
+    perl
+    python3
+  ];
 
-  # these tests require network access
   checkFlags = [
+    # These tests require network access
     "--skip=parse_correct_host_addresses"
     "--skip=parse_hosts_file_and_incorrect_hosts"
   ];
 
   meta = with lib; {
     description = "Faster Nmap Scanning with Rust";
-    mainProgram = "rustscan";
     homepage = "https://github.com/RustScan/RustScan";
+    changelog = "https://github.com/RustScan/RustScan/releases/tag/${version}";
     license = licenses.gpl3Only;
     maintainers = with maintainers; [ figsoda ];
+    mainProgram = "rustscan";
   };
 }