
After final improvements to the official formatter implementation,
this commit now performs the first treewide reformat of Nix files using it.
This is part of the implementation of RFC 166.
Only "inactive" files are reformatted, meaning only files that
aren't being touched by any PR with activity in the past 2 months.
This is to avoid conflicts for PRs that might soon be merged.
Later we can do a full treewide reformat to get the rest,
which should not cause as many conflicts.
A CI check has already been running for some time to ensure that new and
already-formatted files are formatted, so the files being reformatted here
should also stay formatted.
This commit was automatically created and can be verified using
nix-build a08b3a4d19
.tar.gz \
--argstr baseRev b32a0943687d2a5094a6d92f25a4b6e16a76b5b7
result/bin/apply-formatting $NIXPKGS_PATH
68 lines
1.6 KiB
Nix
68 lines
1.6 KiB
Nix
{
|
|
fetchFromGitHub,
|
|
lib,
|
|
stdenv,
|
|
ncurses,
|
|
neovim,
|
|
procps,
|
|
scdoc,
|
|
lua51Packages,
|
|
util-linux,
|
|
}:
|
|
|
|
stdenv.mkDerivation rec {
|
|
pname = "nvimpager";
|
|
version = "0.13.0";
|
|
|
|
src = fetchFromGitHub {
|
|
owner = "lucc";
|
|
repo = pname;
|
|
rev = "v${version}";
|
|
sha256 = "sha256-Au9rRZMZfU4qHi/ng6JO8FnMpySKDbKzr75SBPY3QiA=";
|
|
};
|
|
|
|
buildInputs = [
|
|
ncurses # for tput
|
|
procps # for nvim_get_proc() which uses ps(1)
|
|
];
|
|
nativeBuildInputs = [ scdoc ];
|
|
|
|
makeFlags = [ "PREFIX=$(out)" ];
|
|
buildFlags = [
|
|
"nvimpager.configured"
|
|
"nvimpager.1"
|
|
];
|
|
preBuild = ''
|
|
patchShebangs nvimpager
|
|
substituteInPlace nvimpager --replace-fail ':-nvim' ':-${lib.getExe neovim}'
|
|
'';
|
|
|
|
doCheck = true;
|
|
nativeCheckInputs = [
|
|
lua51Packages.busted
|
|
util-linux
|
|
neovim
|
|
];
|
|
# filter out one test that fails in the sandbox of nix or with neovim v0.10
|
|
# or on macOS
|
|
preCheck = ''
|
|
checkFlagsArray+=('BUSTED=busted --output TAP --exclude-tags=${
|
|
"nix,v10" + lib.optionalString stdenv.hostPlatform.isDarwin ",mac"
|
|
}')
|
|
'';
|
|
|
|
meta = with 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 ];
|
|
mainProgram = "nvimpager";
|
|
};
|
|
}
|