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

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

38 lines
1.1 KiB
Nix
Raw Normal View History

2022-04-14 04:20:00 +00:00
{ lib, stdenv, fetchFromGitHub, curl, libzip, pkg-config, installShellFiles }:
stdenv.mkDerivation rec {
pname = "tldr";
2022-07-31 03:36:16 +00:00
version = "1.5.0";
src = fetchFromGitHub {
owner = "tldr-pages";
2017-03-06 20:12:25 +00:00
repo = "tldr-cpp-client";
rev = "v${version}";
2022-07-31 03:36:16 +00:00
sha256 = "sha256-xim5SB9/26FMjLqhiV+lj+Rm5Tk5luSIqwyYb3kXoFY=";
};
2018-08-03 04:43:43 +00:00
buildInputs = [ curl libzip ];
2022-04-14 04:20:00 +00:00
nativeBuildInputs = [ pkg-config installShellFiles ];
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}
'';
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.
'';
homepage = "https://tldr-pages.github.io";
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;
2018-08-03 02:36:24 +00:00
maintainers = with maintainers; [ taeer carlosdagos ];
platforms = platforms.all;
2016-01-18 01:46:23 +00:00
};
}