From 341ed52eee24dcd3601fa66101d2f029a78000b0 Mon Sep 17 00:00:00 2001 From: xrelkd <46590321+xrelkd@users.noreply.github.com> Date: Sat, 24 Feb 2024 23:02:30 +0800 Subject: [PATCH] sn0int: install shell completions --- pkgs/by-name/sn/sn0int/package.nix | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/pkgs/by-name/sn/sn0int/package.nix b/pkgs/by-name/sn/sn0int/package.nix index 66f89f77e8ea..2410fa0cc230 100644 --- a/pkgs/by-name/sn/sn0int/package.nix +++ b/pkgs/by-name/sn/sn0int/package.nix @@ -7,6 +7,7 @@ , pkgs , sqlite , stdenv +, installShellFiles }: rustPlatform.buildRustPackage rec { @@ -24,6 +25,7 @@ rustPlatform.buildRustPackage rec { nativeBuildInputs = [ pkg-config + installShellFiles ]; buildInputs = [ @@ -39,6 +41,13 @@ rustPlatform.buildRustPackage rec { # in "checkPhase", hence fails in sandbox of "nix". doCheck = false; + postInstall = '' + installShellCompletion --cmd sn0int \ + --bash <($out/bin/sn0int completions bash) \ + --fish <($out/bin/sn0int completions fish) \ + --zsh <($out/bin/sn0int completions zsh) + ''; + meta = with lib; { description = "Semi-automatic OSINT framework and package manager"; homepage = "https://github.com/kpcyrd/sn0int"; @@ -46,5 +55,6 @@ rustPlatform.buildRustPackage rec { license = with licenses; [ gpl3Plus ]; maintainers = with maintainers; [ fab xrelkd ]; platforms = platforms.linux ++ platforms.darwin; + mainProgram = "sn0int"; }; }