mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-12-23 06:03:40 +00:00
31 lines
927 B
Nix
31 lines
927 B
Nix
{ lib, rustPlatform, fetchFromGitHub, installShellFiles }:
|
|
|
|
rustPlatform.buildRustPackage rec {
|
|
pname = "page";
|
|
version = "3.0.0";
|
|
|
|
src = fetchFromGitHub {
|
|
owner = "I60R";
|
|
repo = pname;
|
|
rev = "v${version}";
|
|
sha256 = "sha256-CCjF0KwXd0XSga6/wlWpUPU+Xr0hjWIVVXIP0M8Hh5g=";
|
|
};
|
|
|
|
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
|
|
'';
|
|
|
|
cargoSha256 = "sha256-MFNc4U6DAb5UscqxKz7RORoPeqne2pdkL/+mLLL+pKM=";
|
|
|
|
meta = with lib; {
|
|
description = "Use neovim as pager";
|
|
homepage = "https://github.com/I60R/page";
|
|
license = licenses.mit;
|
|
maintainers = [ maintainers.s1341 ];
|
|
};
|
|
}
|