nixpkgs/pkgs/tools/misc/tldr/default.nix

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

39 lines
1.2 KiB
Nix
Raw Normal View History

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