Merge pull request #265908 from acuteenvy/tlrc

tlrc: init at 1.7.1
This commit is contained in:
Weijia Wang 2023-11-16 23:29:49 +01:00 committed by GitHub
commit 8756d71893
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 48 additions and 0 deletions

View file

@ -371,6 +371,15 @@
githubId = 124545;
name = "Anthony Cowley";
};
acuteenvy = {
matrix = "@acuteenvy:matrix.org";
github = "acuteenvy";
githubId = 126529524;
name = "Lena";
keys = [{
fingerprint = "CE85 54F7 B9BC AC0D D648 5661 AB5F C04C 3C94 443F";
}];
};
adamcstephens = {
email = "happy.plan4249@valkor.net";
matrix = "@adam:valkor.net";

View file

@ -0,0 +1,39 @@
{ lib
, fetchFromGitHub
, rustPlatform
, installShellFiles
}:
rustPlatform.buildRustPackage rec {
pname = "tlrc";
version = "1.7.1";
src = fetchFromGitHub {
owner = "tldr-pages";
repo = "tlrc";
rev = "v${version}";
hash = "sha256-Jdie9ESSbRV07SHjITfQPwDKTedHMbY01FdEMlNOr50=";
};
cargoHash = "sha256-2OXyPtgdRGIIc7jIES9zhRpFiaodcEnaK88k+rUVSJo=";
nativeBuildInputs = [ installShellFiles ];
postInstall = ''
installManPage tldr.1
installShellCompletion \
--name tldr --bash $releaseDir/build/tlrc-*/out/tldr.bash \
--zsh $releaseDir/build/tlrc-*/out/_tldr \
--fish $releaseDir/build/tlrc-*/out/tldr.fish
'';
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 ];
};
}