2020-02-28 00:56:29 +00:00
|
|
|
{ stdenv
|
|
|
|
, rustPlatform
|
|
|
|
, fetchFromGitHub
|
|
|
|
, pkg-config
|
|
|
|
, installShellFiles
|
|
|
|
, openssl
|
|
|
|
, cacert
|
2019-11-01 02:04:12 +00:00
|
|
|
, Security
|
|
|
|
}:
|
2018-04-11 13:12:47 +01:00
|
|
|
|
|
|
|
rustPlatform.buildRustPackage rec {
|
2019-08-31 12:41:23 +01:00
|
|
|
pname = "tealdeer";
|
2020-02-28 00:56:29 +00:00
|
|
|
version = "1.3.0";
|
2018-04-11 13:12:47 +01:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "dbrgn";
|
|
|
|
repo = "tealdeer";
|
|
|
|
rev = "v${version}";
|
2020-02-28 00:56:29 +00:00
|
|
|
sha256 = "0l16qqkrya22nnm4j3dxyq4gb85i3c07p10s00bpqcvki6n6v6r8";
|
2018-04-11 13:12:47 +01:00
|
|
|
};
|
|
|
|
|
2020-02-28 00:56:29 +00:00
|
|
|
cargoSha256 = "0jvgcf493rmkrh85j0fkf8ffanva80syyxclzkvkrzvvwwj78b5l";
|
2018-04-11 13:12:47 +01:00
|
|
|
|
2020-02-28 00:56:29 +00:00
|
|
|
buildInputs = [ openssl cacert ]
|
2019-11-01 02:04:12 +00:00
|
|
|
++ (stdenv.lib.optional stdenv.isDarwin Security);
|
2018-04-11 13:12:47 +01: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 13:12:47 +01:00
|
|
|
NIX_SSL_CERT_FILE = "${cacert}/etc/ssl/certs/ca-bundle.crt";
|
|
|
|
|
|
|
|
# disable tests for now since one needs network
|
|
|
|
# what is unavailable in sandbox build
|
|
|
|
# and i can't disable just this one
|
|
|
|
doCheck = false;
|
|
|
|
|
|
|
|
meta = with stdenv.lib; {
|
2018-10-24 11:07:36 +01:00
|
|
|
description = "A very fast implementation of tldr in Rust";
|
2018-04-11 13:12:47 +01:00
|
|
|
homepage = "https://github.com/dbrgn/tealdeer";
|
|
|
|
maintainers = with maintainers; [ davidak ];
|
|
|
|
license = with licenses; [ asl20 mit ];
|
|
|
|
platforms = platforms.all;
|
|
|
|
};
|
|
|
|
}
|