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