3
0
Fork 0
forked from mirrors/nixpkgs
nixpkgs/pkgs/tools/misc/page/default.nix

32 lines
930 B
Nix
Raw Normal View History

2020-03-19 16:29:05 +00:00
{ lib, rustPlatform, fetchFromGitHub, installShellFiles }:
rustPlatform.buildRustPackage rec {
pname = "page";
2020-11-26 15:32:13 +00:00
version = "2.3.5";
2020-03-19 16:29:05 +00:00
src = fetchFromGitHub {
owner = "I60R";
repo = pname;
rev = "v${version}";
2020-11-26 15:32:13 +00:00
sha256 = "1pk3iclmwbkg4nvsgarq4qjpzapjhsl7b7z6zw6havp1zmx9h806";
2020-03-19 16:29:05 +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
'';
cargoSha256 = "19ff5h8z34z15wdnd3mj8bwlqcixwbimys77gfjmzb3w1g9ivlks";
2020-03-19 16:29:05 +00:00
meta = with lib; {
description = "Use neovim as pager";
homepage = "https://github.com/I60R/page";
license = licenses.mit;
maintainers = [ maintainers.s1341 ];
};
}