nixpkgs/pkgs/tools/misc/page/default.nix

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

31 lines
927 B
Nix
Raw Normal View History

2020-03-19 17:29:05 +01:00
{ lib, rustPlatform, fetchFromGitHub, installShellFiles }:
rustPlatform.buildRustPackage rec {
pname = "page";
2022-12-10 20:12:53 +01:00
version = "4.4.0";
2020-03-19 17:29:05 +01:00
src = fetchFromGitHub {
owner = "I60R";
repo = pname;
rev = "v${version}";
2022-12-10 20:12:53 +01:00
sha256 = "sha256-FNxOWR6An/d3dyCcsfBX7XSwiFlOfdrJ1Tp4qrYrvSk=";
2020-03-19 17:29:05 +01: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-10 20:12:53 +01:00
cargoSha256 = "sha256-K2z85YN85JWgv8imQIm6b02tnQEVB6OiwJ2692wH3nw=";
2020-03-19 17:29:05 +01:00
meta = with lib; {
description = "Use neovim as pager";
homepage = "https://github.com/I60R/page";
license = licenses.mit;
maintainers = [ maintainers.s1341 ];
};
}