about summary refs log tree commit diff
path: root/nixpkgs/pkgs/by-name/as
diff options
context:
space:
mode:
Diffstat (limited to 'nixpkgs/pkgs/by-name/as')
-rw-r--r--nixpkgs/pkgs/by-name/as/asciiquarium-transparent/package.nix35
-rw-r--r--nixpkgs/pkgs/by-name/as/asn/package.nix51
-rw-r--r--nixpkgs/pkgs/by-name/as/ast-grep/package.nix19
3 files changed, 82 insertions, 23 deletions
diff --git a/nixpkgs/pkgs/by-name/as/asciiquarium-transparent/package.nix b/nixpkgs/pkgs/by-name/as/asciiquarium-transparent/package.nix
index 2472d5015daf..b0b476e12bd9 100644
--- a/nixpkgs/pkgs/by-name/as/asciiquarium-transparent/package.nix
+++ b/nixpkgs/pkgs/by-name/as/asciiquarium-transparent/package.nix
@@ -3,32 +3,35 @@
   stdenv,
   fetchFromGitHub,
   makeWrapper,
-  perlPackages,
+  perl,
 }:
-stdenv.mkDerivation {
+stdenv.mkDerivation (finalAttrs: {
   pname = "asciiquarium-transparent";
-  version = "unstable-2023-02-19";
+  version = "1.3";
+
   src = fetchFromGitHub {
     owner = "nothub";
     repo = "asciiquarium";
-    rev = "653cd99a611080c776d18fc7991ae5dd924c72ce";
-    hash = "sha256-72LRFydbObFDXJllmlRjr5O8qjDqtlp3JunE3kwb5aU=";
+    rev = "${finalAttrs.version}";
+    hash = "sha256-zQyVIfwmhF3WsCeIZLwjDufvKzAfjLxaK2s7WTedqCg=";
   };
-  nativeBuildInputs = [makeWrapper];
-  buildInputs = [perlPackages.perl];
+
+  nativeBuildInputs = [ makeWrapper ];
+  buildInputs = [ perl ];
   installPhase = ''
     runHook preInstall
-    mkdir -p $out/bin
-    cp asciiquarium $out/bin/asciiquarium
-    wrapProgram $out/bin/asciiquarium --set PERL5LIB ${perlPackages.makeFullPerlPath [perlPackages.TermAnimation]}
+    install -Dm555 asciiquarium -t $out/bin
+    wrapProgram $out/bin/asciiquarium \
+      --set PERL5LIB ${with perl.pkgs; makeFullPerlPath [ TermAnimation ]}
     runHook postInstall
   '';
-  meta = with lib; {
+
+  meta = {
     description = "An aquarium/sea animation in ASCII art (with option of transparent background)";
-    mainProgram = "asciiquarium";
     homepage = "https://github.com/nothub/asciiquarium";
-    license = with licenses; [gpl2Only];
-    platforms = platforms.unix;
-    maintainers = with maintainers; [quantenzitrone];
+    license = lib.licenses.gpl2Only;
+    mainProgram = "asciiquarium";
+    maintainers = with lib.maintainers; [ quantenzitrone ];
+    platforms = perl.meta.platforms;
   };
-}
+})
diff --git a/nixpkgs/pkgs/by-name/as/asn/package.nix b/nixpkgs/pkgs/by-name/as/asn/package.nix
new file mode 100644
index 000000000000..6a8ec939cb33
--- /dev/null
+++ b/nixpkgs/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";
+  };
+}
diff --git a/nixpkgs/pkgs/by-name/as/ast-grep/package.nix b/nixpkgs/pkgs/by-name/as/ast-grep/package.nix
index 9a80ef6751f2..3334e7128bd4 100644
--- a/nixpkgs/pkgs/by-name/as/ast-grep/package.nix
+++ b/nixpkgs/pkgs/by-name/as/ast-grep/package.nix
@@ -2,31 +2,36 @@
 , rustPlatform
 , fetchFromGitHub
 , stdenv
+, installShellFiles
 }:
 
 rustPlatform.buildRustPackage rec {
   pname = "ast-grep";
-  version = "0.19.3";
+  version = "0.19.4";
 
   src = fetchFromGitHub {
     owner = "ast-grep";
     repo = "ast-grep";
     rev = version;
-    hash = "sha256-nqKDBRH2/YsSmirxJ84BgUTLfgPzZ/EQxqy6Fa7Mfxs=";
+    hash = "sha256-hKqj3LVu/3ndGoZQYyH1yCm5vF0/Ck5bkTKjLIkcUys=";
   };
 
-  cargoHash = "sha256-48ZVbRJkpMO+kJE5Kz96McjXhMtu4TzzjfyYdggNWkQ=";
+  cargoHash = "sha256-Fli97ANWHZvvBC6hImymELkpBqqrAOm006LROj3R3sM=";
 
-  # Work around https://github.com/NixOS/nixpkgs/issues/166205.
-  env = lib.optionalAttrs stdenv.cc.isClang {
-    NIX_LDFLAGS = "-l${stdenv.cc.libcxx.cxxabi.libName}";
-  };
+  nativeBuildInputs = [ installShellFiles ];
 
   # error: linker `aarch64-linux-gnu-gcc` not found
   postPatch = ''
     rm .cargo/config.toml
   '';
 
+  postInstall = ''
+    installShellCompletion --cmd sg \
+      --bash <($out/bin/sg completions bash) \
+      --fish <($out/bin/sg completions fish) \
+      --zsh <($out/bin/sg completions zsh)
+  '';
+
   checkFlags = [
     # disable flaky test
     "--skip=test::test_load_parser_mac"