# Pastebin 72HjiBeq { lib, rustPlatform, fetchFromGitHub, installShellFiles }: rustPlatform.buildRustPackage rec { pname = "page"; version = "2.3.2"; src = fetchFromGitHub { owner = "I60R"; repo = pname; rev = "v${version}"; sha256 = "1plnli0h9zcmncjn8xv1114lp4pw18hajcpmb1cbmhn43isqn3v5"; }; nativeBuildInputs = [ installShellFiles ]; postInstall = '' echo "here here here"; ls -R ${out}; completions_dir=$(find "${out}/target" -name "shell_completions" -type d -printf "%T+\t%p\n" | sort | awk 'NR==1{print $2}') echo completions_dir: ${completions_dir} installShellCompletion --bash $completions_dir/page.bash installShellCompletion --fish $completions_dir/page.fish installShellCompletion --zsh $completions_dir/_page ''; cargoSha256 = "0kjfyyzz29fibazvfgvgh9ds3nnf8cpsm6d91d5jy47nbn060i75"; meta = with lib; { description = "Use neovim as pager"; homepage = "https://github.com/I60R/page"; license = licenses.mit; platforms = platforms.all; maintainers = [ maintainers.s1341 ]; }; }