Unverified Commit e3cea9cb authored by Vinny Meller's avatar Vinny Meller
Browse files

atac: install shell completions & manual page

parent 96c6d34c
Loading
Loading
Loading
Loading
+23 −1
Original line number Diff line number Diff line
@@ -4,6 +4,8 @@
  fetchFromGitHub,
  pkg-config,
  oniguruma,
  installShellFiles,
  writableTmpDirAsHomeHook,
}:
rustPlatform.buildRustPackage (finalAttrs: {
  pname = "atac";
@@ -18,7 +20,11 @@ rustPlatform.buildRustPackage (finalAttrs: {

  cargoHash = "sha256-lJO9riP/3FRrQ/gkKQCghfkNn1ePS+p6FtMcJTIJxZY=";

  nativeBuildInputs = [ pkg-config ];
  nativeBuildInputs = [
    installShellFiles
    writableTmpDirAsHomeHook
    pkg-config
  ];

  buildInputs = [ oniguruma ];

@@ -26,6 +32,22 @@ rustPlatform.buildRustPackage (finalAttrs: {
    RUSTONIG_SYSTEM_LIBONIG = true;
  };

  postInstall = ''
    $out/bin/atac completions bash
    $out/bin/atac completions fish
    $out/bin/atac completions zsh
    installShellCompletion --cmd atac \
      --bash atac.bash \
      --fish atac.fish \
      --zsh _atac

    mkdir -p $out/share/powershell
    $out/bin/atac completions powershell $out/share/powershell

    $out/bin/atac man
    installManPage atac.1
  '';

  meta = {
    description = "Simple API client (postman like) in your terminal";
    homepage = "https://github.com/Julien-cpsn/ATAC";