2023-11-16 04:20:00 +00:00
|
|
|
{ lib
|
2024-09-19 14:19:46 +00:00
|
|
|
, stdenv
|
2023-11-16 04:20:00 +00:00
|
|
|
, fetchFromGitHub
|
|
|
|
, rustPlatform
|
|
|
|
, installShellFiles
|
2024-09-19 14:19:46 +00:00
|
|
|
, darwin
|
2023-11-16 04:20:00 +00:00
|
|
|
}:
|
|
|
|
|
|
|
|
rustPlatform.buildRustPackage rec {
|
|
|
|
pname = "tlrc";
|
2024-07-31 10:19:44 +00:00
|
|
|
version = "1.9.3";
|
2023-11-16 04:20:00 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "tldr-pages";
|
|
|
|
repo = "tlrc";
|
|
|
|
rev = "v${version}";
|
2024-07-31 10:19:44 +00:00
|
|
|
hash = "sha256-3KS/KN6/RO+PxoxbCVryymnTyWcmfXuCoc9E+asdU/E=";
|
2023-11-16 04:20:00 +00:00
|
|
|
};
|
|
|
|
|
2024-07-31 10:19:44 +00:00
|
|
|
cargoHash = "sha256-9MnYSmMhLn31aHwooo8W/1Rp7N5P6Tar7Ft2iXRVnh0=";
|
2023-11-16 04:20:00 +00:00
|
|
|
|
|
|
|
nativeBuildInputs = [ installShellFiles ];
|
|
|
|
|
2024-09-26 11:04:55 +00:00
|
|
|
buildInputs = lib.optionals stdenv.hostPlatform.isDarwin [
|
2024-09-19 14:19:46 +00:00
|
|
|
darwin.apple_sdk.frameworks.Security
|
|
|
|
];
|
|
|
|
|
2023-11-16 04:20:00 +00:00
|
|
|
postInstall = ''
|
|
|
|
installManPage tldr.1
|
2024-04-21 15:54:59 +00:00
|
|
|
installShellCompletion completions/{tldr.bash,_tldr,tldr.fish}
|
2023-11-16 04:20:00 +00:00
|
|
|
'';
|
|
|
|
|
|
|
|
meta = with lib; {
|
|
|
|
description = "Official tldr client written in Rust";
|
|
|
|
homepage = "https://github.com/tldr-pages/tlrc";
|
|
|
|
changelog = "https://github.com/tldr-pages/tlrc/releases/tag/v${version}";
|
|
|
|
license = licenses.mit;
|
|
|
|
mainProgram = "tldr";
|
|
|
|
maintainers = with maintainers; [ acuteenvy ];
|
|
|
|
};
|
|
|
|
}
|