Skip to content

Commit

Permalink
arp-scan-rs: init at 0.14.0 (NixOS#371897)
Browse files Browse the repository at this point in the history
  • Loading branch information
fabaff authored Jan 15, 2025
2 parents 121560b + f8f1384 commit 29c275e
Showing 1 changed file with 46 additions and 0 deletions.
46 changes: 46 additions & 0 deletions pkgs/by-name/ar/arp-scan-rs/package.nix
Original file line number Diff line number Diff line change
@@ -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";
};
}

0 comments on commit 29c275e

Please sign in to comment.