nixpkgs mirror (for testing)
github.com/NixOS/nixpkgs
nix
1{
2 lib,
3 fetchFromGitHub,
4 rustPlatform,
5 installShellFiles,
6}:
7
8rustPlatform.buildRustPackage rec {
9 pname = "tlrc";
10 version = "1.11.1";
11
12 src = fetchFromGitHub {
13 owner = "tldr-pages";
14 repo = "tlrc";
15 rev = "v${version}";
16 hash = "sha256-SPYLQ7o3sbrjy3MmBAB0YoVJI1rSmePbrZY0yb2SnFE=";
17 };
18
19 cargoHash = "sha256-i2nSwsQnwhiMhG8QJb0z0zPuNxTLwuO1dgJxI4e4FqY=";
20
21 nativeBuildInputs = [ installShellFiles ];
22
23 postInstall = ''
24 installManPage tldr.1
25 installShellCompletion completions/{tldr.bash,_tldr,tldr.fish}
26 '';
27
28 meta = {
29 description = "Official tldr client written in Rust";
30 homepage = "https://github.com/tldr-pages/tlrc";
31 changelog = "https://github.com/tldr-pages/tlrc/releases/tag/v${version}";
32 license = lib.licenses.mit;
33 mainProgram = "tldr";
34 maintainers = with lib.maintainers; [ acuteenvy ];
35 };
36}