tldr: install completions

This commit is contained in:
Mario Rodas 2022-04-14 04:20:00 +00:00
parent 641257cc96
commit c8c6adced1

View file

@ -1,4 +1,4 @@
{ lib, stdenv, fetchFromGitHub, curl, libzip, pkg-config }:
{ lib, stdenv, fetchFromGitHub, curl, libzip, pkg-config, installShellFiles }:
stdenv.mkDerivation rec {
pname = "tldr";
@ -12,12 +12,16 @@ stdenv.mkDerivation rec {
};
buildInputs = [ curl libzip ];
nativeBuildInputs = [ pkg-config ];
nativeBuildInputs = [ pkg-config installShellFiles ];
makeFlags = ["CC=${stdenv.cc.targetPrefix}cc" "LD=${stdenv.cc.targetPrefix}cc" "CFLAGS="];
installFlags = [ "PREFIX=$(out)" ];
postInstall = ''
installShellCompletion --cmd tldr autocomplete/complete.{bash,fish,zsh}
'';
meta = with lib; {
description = "Simplified and community-driven man pages";
longDescription = ''