mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-12-11 08:13:04 +00:00
f1495eaa8c
Signed-off-by: Muhammad Falak R Wani <falakreyaz@gmail.com>
53 lines
1.3 KiB
Nix
53 lines
1.3 KiB
Nix
{ lib
|
|
, stdenv
|
|
, rustPlatform
|
|
, fetchFromGitHub
|
|
, installShellFiles
|
|
, Security
|
|
}:
|
|
|
|
rustPlatform.buildRustPackage rec {
|
|
pname = "tealdeer";
|
|
version = "1.7.0";
|
|
|
|
src = fetchFromGitHub {
|
|
owner = "dbrgn";
|
|
repo = "tealdeer";
|
|
rev = "v${version}";
|
|
hash = "sha256-7Wavhl5irQU9OV7+dslrIQEAcsaqJZ/jWmxaCyTBsEs=";
|
|
};
|
|
|
|
cargoHash = "sha256-WCbpwvCXm54/Cv+TscaqseWzTUd8V1DxmS30fUZZTwI=";
|
|
|
|
buildInputs = lib.optional stdenv.hostPlatform.isDarwin Security;
|
|
|
|
nativeBuildInputs = [ installShellFiles ];
|
|
|
|
postInstall = ''
|
|
installShellCompletion --cmd tldr \
|
|
--bash completion/bash_tealdeer \
|
|
--fish completion/fish_tealdeer \
|
|
--zsh completion/zsh_tealdeer
|
|
'';
|
|
|
|
# Disable tests that require Internet access:
|
|
checkFlags = [
|
|
"--skip test_autoupdate_cache"
|
|
"--skip test_create_cache_directory_path"
|
|
"--skip test_pager_flag_enable"
|
|
"--skip test_quiet_cache"
|
|
"--skip test_quiet_failures"
|
|
"--skip test_quiet_old_cache"
|
|
"--skip test_spaces_find_command"
|
|
"--skip test_update_cache"
|
|
];
|
|
|
|
meta = with lib; {
|
|
description = "Very fast implementation of tldr in Rust";
|
|
homepage = "https://github.com/dbrgn/tealdeer";
|
|
maintainers = with maintainers; [ davidak newam mfrw ];
|
|
license = with licenses; [ asl20 mit ];
|
|
mainProgram = "tldr";
|
|
};
|
|
}
|