From f8f1384ae8f72723609499330156dc5f93e5e66f Mon Sep 17 00:00:00 2001 From: Fabian Affolter Date: Wed, 15 Jan 2025 11:49:40 +0100 Subject: [PATCH] arp-scan-rs: init at 0.14.0 ARP scan tool for fast local network scans https://github.com/kongbytes/arp-scan-rs --- pkgs/by-name/ar/arp-scan-rs/package.nix | 46 +++++++++++++++++++++++++ 1 file changed, 46 insertions(+) create mode 100644 pkgs/by-name/ar/arp-scan-rs/package.nix diff --git a/pkgs/by-name/ar/arp-scan-rs/package.nix b/pkgs/by-name/ar/arp-scan-rs/package.nix new file mode 100644 index 0000000000000..76cc1472edaf9 --- /dev/null +++ b/pkgs/by-name/ar/arp-scan-rs/package.nix @@ -0,0 +1,46 @@ +{ + lib, + fetchFromGitHub, + gitUpdater, + rustPlatform, + versionCheckHook, +}: + +rustPlatform.buildRustPackage rec { + pname = "arp-scan-rs"; + version = "0.14.0"; + + src = fetchFromGitHub { + owner = "kongbytes"; + repo = "arp-scan-rs"; + tag = "v${version}"; + hash = "sha256-CLxeT2olrxRCJ12IZ1PvLW7ZuX0HPsoNuFyxmGBhB8w="; + }; + + cargoHash = "sha256-+Ph5k3qaK4USggTnZqyOdH6oKv5Xr2/NeQ9C0Q6g5sQ="; + + nativeInstallCheckInputs = [ versionCheckHook ]; + + preCheck = '' + # Test fails + substituteInPlace src/network.rs \ + --replace-fail 'Some("one.one.one.one".to_string())' 'None' + ''; + + versionCheckProgram = [ "${placeholder "out"}/bin/arp-scan" ]; + + versionCheckProgramArg = "--version"; + + doInstallCheck = true; + + passthru.updateScript = gitUpdater { }; + + meta = { + description = "ARP scan tool for fast local network scans"; + homepage = "https://github.com/kongbytes/arp-scan-rs"; + changelog = "https://github.com/kongbytes/arp-scan-rs/releases/tag/v${version}"; + license = lib.licenses.agpl3Only; + maintainers = with lib.maintainers; [ fab ]; + mainProgram = "arp-scan"; + }; +}