nixpkgs/pkgs/tools/misc/tldr/default.nix
Daniel Nagy cfce957d4f
treewide: more meta changelog urls and mainPrograms (#200062)
* turbovnc: add changelog url

* memray: add changelog url

* ddcutil: add changelog url

* jc: add changelog url

* zed: add changelog url

* lua: use https homepage

* sil: use https url

* the-powder-toy: use https homepage

* tldr: add changelog url

* openjpeg: add changelog url

* scheme48: use https homepage

* bubblewrap: set meta.mainProgram

* zbar: set meta.mainProgram

* qpdf: add changelog url

* nvtop: set meta.mainProgram

* squashfs: add meta.mainProgram
2022-11-09 16:41:13 +01:00

38 lines
1.1 KiB
Nix

{ lib, stdenv, fetchFromGitHub, curl, libzip, pkg-config, installShellFiles }:
stdenv.mkDerivation rec {
pname = "tldr";
version = "1.5.0";
src = fetchFromGitHub {
owner = "tldr-pages";
repo = "tldr-cpp-client";
rev = "v${version}";
sha256 = "sha256-xim5SB9/26FMjLqhiV+lj+Rm5Tk5luSIqwyYb3kXoFY=";
};
buildInputs = [ curl libzip ];
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 = ''
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";
license = licenses.mit;
maintainers = with maintainers; [ taeer carlosdagos ];
platforms = platforms.all;
};
}