From 87f8b1d685feb0ee8ea3015ec8db741fcf1d2505 Mon Sep 17 00:00:00 2001 From: devhell Date: Sat, 20 Aug 2022 17:03:48 +0100 Subject: [PATCH] asn: init at 0.72.1 --- pkgs/applications/networking/asn/default.nix | 47 ++++++++++++++++++++ pkgs/top-level/all-packages.nix | 2 + 2 files changed, 49 insertions(+) create mode 100644 pkgs/applications/networking/asn/default.nix diff --git a/pkgs/applications/networking/asn/default.nix b/pkgs/applications/networking/asn/default.nix new file mode 100644 index 000000000000..0dca92580524 --- /dev/null +++ b/pkgs/applications/networking/asn/default.nix @@ -0,0 +1,47 @@ +{ lib +, stdenv +, fetchFromGitHub +, makeWrapper +, curl +, whois +, bind +, mtr +, jq +, ipcalc +, grepcidr +, nmap +, aha +}: + +stdenv.mkDerivation rec { + pname = "asn"; + version = "0.72.1"; + + src = fetchFromGitHub { + owner = "nitefood"; + repo = "asn"; + rev = "v${version}"; + sha256 = "sha256-2JGc1PhvmuZFT6c6UcxHKttHqWF+NsekqnYtdGKgU2U="; + }; + + 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 = { + 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"; + license = with lib.licenses; [ mit ]; + maintainers = with lib.maintainers; [ devhell ]; + }; +} diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 78297451107c..61f7c9f6e342 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -238,6 +238,8 @@ with pkgs; aeskeyfind = callPackage ../tools/security/aeskeyfind { }; + asn = callPackage ../applications/networking/asn { }; + astrolog = callPackage ../applications/science/astronomy/astrolog { }; atkinson-hyperlegible = callPackage ../data/fonts/atkinson-hyperlegible { };