about summary refs log tree commit diff
path: root/pkgs/by-name/as
diff options
context:
space:
mode:
authordevhell <devhell@mailfresser.de>2024-03-13 15:07:37 +0000
committerdevhell <devhell@mailfresser.de>2024-03-13 15:07:37 +0000
commit2625cadf05bf7032c36225978f8bc7eaf1502cbf (patch)
treef5dc876a07117bf0d0e8a2a3490724c60e287120 /pkgs/by-name/as
parent2dbc8f62d8af7a1ab962e4b20d12b25ddcb86ced (diff)
asn: move to by-name
Diffstat (limited to 'pkgs/by-name/as')
-rw-r--r--pkgs/by-name/as/asn/package.nix51
1 files changed, 51 insertions, 0 deletions
diff --git a/pkgs/by-name/as/asn/package.nix b/pkgs/by-name/as/asn/package.nix
new file mode 100644
index 0000000000000..6a8ec939cb33f
--- /dev/null
+++ b/pkgs/by-name/as/asn/package.nix
@@ -0,0 +1,51 @@
+{ lib
+, stdenv
+, fetchFromGitHub
+, makeWrapper
+, curl
+, whois
+, bind
+, mtr
+, jq
+, ipcalc
+, grepcidr
+, nmap
+, aha
+}:
+
+stdenv.mkDerivation rec {
+  pname = "asn";
+  version = "0.76.1";
+
+  src = fetchFromGitHub {
+    owner = "nitefood";
+    repo = "asn";
+    rev = "refs/tags/v${version}";
+    hash = "sha256-9UDd0tgRKEFC1V1+1s9Ghev0I48L8UR9/YbZKX3F1MU=";
+  };
+
+  nativeBuildInputs = [
+    makeWrapper
+  ];
+
+  installPhase = ''
+    install -Dv asn "$out/bin/asn"
+
+    wrapProgram $out/bin/asn \
+      --prefix PATH : "${lib.makeBinPath [ curl whois bind mtr jq ipcalc grepcidr nmap aha ]}"
+  '';
+
+  meta = with lib; {
+    description = "OSINT command line tool for investigating network data";
+    longDescription = ''
+      ASN / RPKI validity / BGP stats / IPv4v6 / Prefix / URL / ASPath / Organization /
+      IP reputation / IP geolocation / IP fingerprinting / Network recon /
+      lookup API server / Web traceroute server
+    '';
+    homepage = "https://github.com/nitefood/asn";
+    changelog = "https://github.com/nitefood/asn/releases/tag/v${version}";
+    license = with licenses; [ mit ];
+    maintainers = with maintainers; [ devhell ];
+    mainProgram = "asn";
+  };
+}