2022-04-27 09:35:20 +00:00
|
|
|
{ lib, stdenv, fetchFromGitHub, curl, libzip, pkg-config, installShellFiles }:
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
pname = "tldr";
|
2023-05-24 13:37:59 +00:00
|
|
|
version = "1.6.0";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "tldr-pages";
|
2023-10-09 19:29:22 +00:00
|
|
|
repo = "tldr-c-client";
|
2020-04-24 23:36:52 +00:00
|
|
|
rev = "v${version}";
|
2023-05-24 13:37:59 +00:00
|
|
|
sha256 = "sha256-9pBMo+t/44tuT/CisS0w60KaKXjPfNTMr2v6Ftjaf1k=";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
buildInputs = [ curl libzip ];
|
2022-04-27 09:35:20 +00:00
|
|
|
nativeBuildInputs = [ pkg-config installShellFiles ];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2021-02-19 19:06:45 +00:00
|
|
|
makeFlags = ["CC=${stdenv.cc.targetPrefix}cc" "LD=${stdenv.cc.targetPrefix}cc" "CFLAGS="];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
installFlags = [ "PREFIX=$(out)" ];
|
|
|
|
|
2022-04-27 09:35:20 +00:00
|
|
|
postInstall = ''
|
|
|
|
installShellCompletion --cmd tldr autocomplete/complete.{bash,fish,zsh}
|
|
|
|
'';
|
|
|
|
|
2021-01-15 22:18:51 +00:00
|
|
|
meta = with lib; {
|
2020-04-24 23:36:52 +00:00
|
|
|
description = "Simplified and community-driven man pages";
|
|
|
|
longDescription = ''
|
|
|
|
tldr pages gives common use cases for commands, so you don't need to hunt
|
|
|
|
through a man page for the correct flags.
|
|
|
|
'';
|
2023-05-24 13:37:59 +00:00
|
|
|
homepage = "https://tldr.sh";
|
2022-11-21 17:40:18 +00:00
|
|
|
changelog = "https://github.com/tldr-pages/tldr-c-client/blob/v${version}/CHANGELOG.md";
|
2020-04-24 23:36:52 +00:00
|
|
|
license = licenses.mit;
|
2023-05-24 13:37:59 +00:00
|
|
|
maintainers = with maintainers; [ taeer carlosdagos kbdharun];
|
2020-04-24 23:36:52 +00:00
|
|
|
platforms = platforms.all;
|
|
|
|
};
|
|
|
|
}
|