2022-04-14 04:20:00 +00:00
|
|
|
{ lib, stdenv, fetchFromGitHub, curl, libzip, pkg-config, installShellFiles }:
|
2016-01-03 21:27:00 +00:00
|
|
|
|
2016-01-24 19:31:44 +00:00
|
|
|
stdenv.mkDerivation rec {
|
2019-08-15 12:41:18 +00:00
|
|
|
pname = "tldr";
|
2023-12-13 13:49:59 +00:00
|
|
|
version = "1.6.1";
|
2016-01-03 21:27:00 +00:00
|
|
|
|
2016-01-18 02:04:54 +00:00
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "tldr-pages";
|
2023-09-14 17:24:04 +00:00
|
|
|
repo = "tldr-c-client";
|
2017-03-06 20:12:25 +00:00
|
|
|
rev = "v${version}";
|
2023-12-13 13:49:59 +00:00
|
|
|
sha256 = "sha256-1L9frURnzfq0XvPBs8D+hBikybAw8qkb0DyZZtkZleY=";
|
2016-01-03 21:27:00 +00:00
|
|
|
};
|
|
|
|
|
2018-08-03 04:43:43 +00:00
|
|
|
buildInputs = [ curl libzip ];
|
2022-04-14 04:20:00 +00:00
|
|
|
nativeBuildInputs = [ pkg-config installShellFiles ];
|
2016-01-03 21:27:00 +00:00
|
|
|
|
2021-02-16 11:48:46 +00:00
|
|
|
makeFlags = ["CC=${stdenv.cc.targetPrefix}cc" "LD=${stdenv.cc.targetPrefix}cc" "CFLAGS="];
|
2018-08-03 02:36:24 +00:00
|
|
|
|
2016-04-06 17:49:19 +00:00
|
|
|
installFlags = [ "PREFIX=$(out)" ];
|
2016-01-18 01:46:23 +00:00
|
|
|
|
2022-04-14 04:20:00 +00:00
|
|
|
postInstall = ''
|
|
|
|
installShellCompletion --cmd tldr autocomplete/complete.{bash,fish,zsh}
|
|
|
|
'';
|
|
|
|
|
2021-01-11 07:54:33 +00:00
|
|
|
meta = with lib; {
|
2016-01-18 01:46:23 +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-10 07:59:06 +00:00
|
|
|
homepage = "https://tldr.sh";
|
2022-11-09 15:41:13 +00:00
|
|
|
changelog = "https://github.com/tldr-pages/tldr-c-client/blob/v${version}/CHANGELOG.md";
|
2016-01-18 01:46:23 +00:00
|
|
|
license = licenses.mit;
|
2023-05-10 07:59:06 +00:00
|
|
|
maintainers = with maintainers; [ taeer carlosdagos kbdharun];
|
2018-08-03 02:36:24 +00:00
|
|
|
platforms = platforms.all;
|
2023-11-27 01:17:53 +00:00
|
|
|
mainProgram = "tldr";
|
2016-01-18 01:46:23 +00:00
|
|
|
};
|
2016-01-03 21:27:00 +00:00
|
|
|
}
|