Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions maintainers/maintainer-list.nix
Original file line number Diff line number Diff line change
Expand Up @@ -4936,6 +4936,12 @@
githubId = 45168934;
name = "Louis Blin";
};
lucc = {
email = "[email protected]";
github = "lucc";
githubId = 1104419;
name = "Lucas Hoffmann";
};
ldelelis = {
email = "[email protected]";
github = "ldelelis";
Expand Down
47 changes: 47 additions & 0 deletions pkgs/tools/misc/nvimpager/default.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
{ fetchFromGitHub
, stdenv
, ncurses, neovim, procps
, pandoc, lua51Packages, util-linux
}:

stdenv.mkDerivation rec {
pname = "nvimpager";
version = "0.9";

src = fetchFromGitHub {
owner = "lucc";
repo = pname;
rev = "v${version}";
sha256 = "1xy5387szfw0bp8dr7d4z33wd4xva7q219rvz8gc0vvv1vsy73va";
};

buildInputs = [
ncurses # for tput
procps # for nvim_get_proc() which uses ps(1)
];
nativeBuildInputs = [ pandoc ];

makeFlags = [ "PREFIX=$(out)" ];
buildFlags = [ "nvimpager.configured" ];
preBuild = ''
patchShebangs nvimpager
substituteInPlace nvimpager --replace ':-nvim' ':-${neovim}/bin/nvim'
'';

doCheck = true;
checkInputs = [ lua51Packages.busted util-linux neovim ];
checkPhase = ''script -c "busted --lpath './?.lua' test"'';

meta = with 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 = [ maintainers.lucc ];
};
}
2 changes: 2 additions & 0 deletions pkgs/top-level/all-packages.nix
Original file line number Diff line number Diff line change
Expand Up @@ -6155,6 +6155,8 @@ in

nssmdns = callPackage ../tools/networking/nss-mdns { };

nvimpager = callPackage ../tools/misc/nvimpager { };

nwdiag = with python3Packages; toPythonApplication nwdiag;

nxdomain = python3.pkgs.callPackage ../tools/networking/nxdomain { };
Expand Down