2021-01-11 07:54:33 +00:00
|
|
|
{ lib, stdenv
|
2020-02-28 00:56:29 +00:00
|
|
|
, rustPlatform
|
|
|
|
, fetchFromGitHub
|
|
|
|
, pkg-config
|
|
|
|
, installShellFiles
|
|
|
|
, openssl
|
2019-11-01 02:04:12 +00:00
|
|
|
, Security
|
|
|
|
}:
|
2018-04-11 12:12:47 +00:00
|
|
|
|
|
|
|
rustPlatform.buildRustPackage rec {
|
2019-08-31 11:41:23 +00:00
|
|
|
pname = "tealdeer";
|
2020-09-05 00:01:50 +00:00
|
|
|
version = "1.4.1";
|
2018-04-11 12:12:47 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "dbrgn";
|
|
|
|
repo = "tealdeer";
|
|
|
|
rev = "v${version}";
|
2020-09-05 00:01:50 +00:00
|
|
|
sha256 = "1f37qlw4nxdhlqlqzzb4j11gsv26abk2nk2qhbzj77kp4v2b125x";
|
2018-04-11 12:12:47 +00:00
|
|
|
};
|
|
|
|
|
2021-05-07 11:00:49 +00:00
|
|
|
cargoSha256 = "1rjnparpcn8rnqy43xl4gg151p1a0zj9sna600hz01r41g1hgccq";
|
2018-04-11 12:12:47 +00:00
|
|
|
|
2020-07-24 00:26:31 +00:00
|
|
|
buildInputs = if stdenv.isDarwin then [ Security ] else [ openssl ];
|
2018-04-11 12:12:47 +00:00
|
|
|
|
2020-02-28 00:56:29 +00:00
|
|
|
nativeBuildInputs = [ installShellFiles pkg-config ];
|
|
|
|
|
|
|
|
postInstall = ''
|
|
|
|
installShellCompletion --bash --name tealdeer.bash bash_tealdeer
|
|
|
|
installShellCompletion --fish --name tealdeer.fish fish_tealdeer
|
|
|
|
installShellCompletion --zsh --name _tealdeer zsh_tealdeer
|
|
|
|
'';
|
|
|
|
|
2018-04-11 12:12:47 +00:00
|
|
|
# disable tests for now since one needs network
|
|
|
|
# what is unavailable in sandbox build
|
|
|
|
# and i can't disable just this one
|
|
|
|
doCheck = false;
|
|
|
|
|
2021-01-11 07:54:33 +00:00
|
|
|
meta = with lib; {
|
2018-10-24 10:07:36 +00:00
|
|
|
description = "A very fast implementation of tldr in Rust";
|
2018-04-11 12:12:47 +00:00
|
|
|
homepage = "https://github.com/dbrgn/tealdeer";
|
|
|
|
maintainers = with maintainers; [ davidak ];
|
|
|
|
license = with licenses; [ asl20 mit ];
|
2021-09-02 19:42:33 +00:00
|
|
|
mainProgram = "tldr";
|
2018-04-11 12:12:47 +00:00
|
|
|
};
|
|
|
|
}
|