2020-04-24 23:36:52 +00:00
|
|
|
{ lib, rustPlatform, fetchFromGitHub, installShellFiles }:
|
|
|
|
|
|
|
|
rustPlatform.buildRustPackage rec {
|
|
|
|
pname = "page";
|
2022-12-02 08:20:57 +00:00
|
|
|
version = "4.1.0";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "I60R";
|
|
|
|
repo = pname;
|
|
|
|
rev = "v${version}";
|
2022-12-02 08:20:57 +00:00
|
|
|
sha256 = "sha256-w/6uCzBRXsmq7Khe+8ysfgBoxnWBLyRMyb43sCxNYMA=";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
nativeBuildInputs = [ installShellFiles ];
|
|
|
|
postInstall = ''
|
|
|
|
completions_dir=$(find "target" -name "shell_completions" -type d -printf "%T+\t%p\n" | sort | awk 'NR==1{print $2}')
|
|
|
|
installShellCompletion --bash $completions_dir/page.bash
|
|
|
|
installShellCompletion --fish $completions_dir/page.fish
|
|
|
|
installShellCompletion --zsh $completions_dir/_page
|
|
|
|
'';
|
|
|
|
|
2022-12-02 08:20:57 +00:00
|
|
|
cargoSha256 = "sha256-xHGlJxUpmqR+WoKURpRAJAhmmKXIO0SWg9VLFiinKfo=";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
meta = with lib; {
|
|
|
|
description = "Use neovim as pager";
|
|
|
|
homepage = "https://github.com/I60R/page";
|
|
|
|
license = licenses.mit;
|
|
|
|
maintainers = [ maintainers.s1341 ];
|
|
|
|
};
|
|
|
|
}
|