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

36 lines
1 KiB
Nix
Raw Normal View History

{ stdenv, fetchFromGitHub, clang, curl, libzip, pkgconfig }:
stdenv.mkDerivation rec {
name = "tldr-${version}";
2017-03-06 21:12:25 +01:00
version = "1.3.0";
src = fetchFromGitHub {
owner = "tldr-pages";
2017-03-06 21:12:25 +01:00
repo = "tldr-cpp-client";
rev = "v${version}";
sha256 = "10ylpiqc06p0qpma72vwksd7hd107s0vlx9c6s9rz4vc3i274lb6";
};
2016-01-18 02:46:23 +01:00
buildInputs = [ curl clang libzip ];
nativeBuildInputs = [ pkgconfig ];
2018-08-03 04:36:24 +02:00
preConfigure = stdenv.lib.optionalString stdenv.isDarwin ''
substituteInPlace Makefile --replace "gcc" "$CC"
substituteInPlace Makefile --replace "gcc" "$CC"
'';
2016-04-06 19:49:19 +02:00
installFlags = [ "PREFIX=$(out)" ];
2016-01-18 02:46:23 +01:00
meta = with stdenv.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 = http://tldr-pages.github.io;
license = licenses.mit;
2018-08-03 04:36:24 +02:00
maintainers = with maintainers; [ taeer carlosdagos ];
platforms = platforms.all;
2016-01-18 02:46:23 +01:00
};
}