-
-
Notifications
You must be signed in to change notification settings - Fork 19.7k
nvimpager: init at 0.9 #107057
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
nvimpager: init at 0.9 #107057
Changes from 1 commit
b497ea4
d5fd144
1adc24f
9736e28
b1ae7ae
22a2a57
976a790
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,50 @@ | ||
| { fetchFromGitHub | ||
| , pkgs | ||
| # Defaults to false until I find out how to provide /dev/tty inside the | ||
| # sandbox. | ||
| , doCheck ? false | ||
|
lucc marked this conversation as resolved.
Outdated
|
||
| }: | ||
|
|
||
| pkgs.stdenv.mkDerivation rec { | ||
| pname = "nvimpager"; | ||
| version = "0.9"; | ||
|
|
||
| src = fetchFromGitHub { | ||
| owner = "lucc"; | ||
| repo = pname; | ||
| rev = "v${version}"; | ||
| sha256 = "1xy5387szfw0bp8dr7d4z33wd4xva7q219rvz8gc0vvv1vsy73va"; | ||
| }; | ||
|
|
||
| buildInputs = with pkgs; [ | ||
| ncurses # for tput | ||
| neovim | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. what if I use a custom neovim ? maybe it should just be wrapped so that using a different neovim doesn't trigger a rebuild though I would think it's a pretty small package.
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Sorry I don't understand the question because I know to little about nix. I assume that this will use Or are you asking why I did not put What should be wrapped how?
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I don't think that's necessary: we don't even compile something here so rebuilds are cheap.
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. It causes a rebuild because the full path to neovim is hard coded into the shell script (the shell script accepts |
||
| procps # for nvim_get_proc() which uses ps(1) | ||
| pandoc | ||
|
lucc marked this conversation as resolved.
Outdated
|
||
| ]; | ||
|
|
||
| makeFlags = [ "PREFIX=$(out)" ]; | ||
| buildFlags = [ "nvimpager.configured" ]; | ||
| preBuild = '' | ||
| substituteInPlace nvimpager \ | ||
| --replace '/usr/bin/env bash' '${pkgs.bash}/bin/bash' \ | ||
|
lucc marked this conversation as resolved.
Outdated
|
||
| --replace ':-nvim' ':-${pkgs.neovim}/bin/nvim' | ||
| ''; | ||
|
|
||
| inherit doCheck; | ||
| checkInputs = with pkgs; [ lua51Packages.busted ]; | ||
| checkPhase = "busted --lpath './?.lua' test"; | ||
|
|
||
| meta = with pkgs.stdenv.lib; { | ||
| description = "Use neovim as pager"; | ||
| longDescription = '' | ||
| Use neovim as a pager to view manpages, diffs, etc with nvim's syntax | ||
| highlighting. Includes a cat mode to print highlighted files to stdout | ||
| and a ansi esc mode to highlight ansi escape sequences in neovim. | ||
| ''; | ||
| homepage = "https://github.com/lucc/nvimpager"; | ||
| license = licenses.bsd2; | ||
| platforms = platforms.unix; | ||
| maintainers = with maintainers; [ lucc ]; | ||
| }; | ||
| } | ||
Uh oh!
There was an error while loading. Please reload this page.