nixpkgs/pkgs/by-name/tl/tlrc/package.nix

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

42 lines
991 B
Nix
Raw Normal View History

2023-11-06 19:12:37 +00:00
{ lib
2024-08-04 11:59:22 +00:00
, stdenv
2023-11-06 19:12:37 +00:00
, fetchFromGitHub
, rustPlatform
, installShellFiles
2024-08-04 11:59:22 +00:00
, darwin
2023-11-06 19:12:37 +00:00
}:
rustPlatform.buildRustPackage rec {
pname = "tlrc";
2024-07-29 13:35:31 +00:00
version = "1.9.3";
2023-11-06 19:12:37 +00:00
src = fetchFromGitHub {
owner = "tldr-pages";
repo = "tlrc";
rev = "v${version}";
2024-07-29 13:35:31 +00:00
hash = "sha256-3KS/KN6/RO+PxoxbCVryymnTyWcmfXuCoc9E+asdU/E=";
2023-11-06 19:12:37 +00:00
};
2024-07-29 13:35:31 +00:00
cargoHash = "sha256-9MnYSmMhLn31aHwooo8W/1Rp7N5P6Tar7Ft2iXRVnh0=";
2023-11-06 19:12:37 +00:00
nativeBuildInputs = [ installShellFiles ];
2024-08-04 11:59:22 +00:00
buildInputs = lib.optionals stdenv.hostPlatform.isDarwin [
darwin.apple_sdk.frameworks.Security
];
2023-11-06 19:12:37 +00:00
postInstall = ''
installManPage tldr.1
2024-03-24 12:46:08 +00:00
installShellCompletion completions/{tldr.bash,_tldr,tldr.fish}
2023-11-06 19:12:37 +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 ];
};
}