catalyst-browser: init at 3.9.4 (#350552)
[NixPkgs.git] / pkgs / by-name / tl / tlrc / package.nix
blob483d729c1718a1a938d5f4963bde574aa0686053
2   lib,
3   stdenv,
4   fetchFromGitHub,
5   rustPlatform,
6   installShellFiles,
7   darwin,
8 }:
10 rustPlatform.buildRustPackage rec {
11   pname = "tlrc";
12   version = "1.9.3";
14   src = fetchFromGitHub {
15     owner = "tldr-pages";
16     repo = "tlrc";
17     rev = "v${version}";
18     hash = "sha256-3KS/KN6/RO+PxoxbCVryymnTyWcmfXuCoc9E+asdU/E=";
19   };
21   cargoHash = "sha256-9MnYSmMhLn31aHwooo8W/1Rp7N5P6Tar7Ft2iXRVnh0=";
23   nativeBuildInputs = [ installShellFiles ];
25   buildInputs = lib.optionals stdenv.hostPlatform.isDarwin [
26     darwin.apple_sdk.frameworks.Security
27   ];
29   postInstall = ''
30     installManPage tldr.1
31     installShellCompletion completions/{tldr.bash,_tldr,tldr.fish}
32   '';
34   meta = with lib; {
35     description = "Official tldr client written in Rust";
36     homepage = "https://github.com/tldr-pages/tlrc";
37     changelog = "https://github.com/tldr-pages/tlrc/releases/tag/v${version}";
38     license = licenses.mit;
39     mainProgram = "tldr";
40     maintainers = with maintainers; [ acuteenvy ];
41   };