nvimpager: 0.9 -> 0.10 (#126027)
* nvimpager: 0.9 -> 0.10 Patch the makefile as it assumes it is run in a git checkout and not from an extracted tarball. * fixup: add comment about new subsitute command in preBuild * fixup: Fix definition of checkPhase
This commit is contained in:
parent
8bf0088ce6
commit
d56b1567ec
|
@ -1,36 +1,43 @@
|
||||||
{ fetchFromGitHub
|
{ fetchFromGitHub
|
||||||
, lib, stdenv
|
, lib, stdenv
|
||||||
, ncurses, neovim, procps
|
, ncurses, neovim, procps
|
||||||
, pandoc, lua51Packages, util-linux
|
, scdoc, lua51Packages, util-linux
|
||||||
}:
|
}:
|
||||||
|
|
||||||
stdenv.mkDerivation rec {
|
stdenv.mkDerivation rec {
|
||||||
pname = "nvimpager";
|
pname = "nvimpager";
|
||||||
version = "0.9";
|
version = "0.10";
|
||||||
|
|
||||||
src = fetchFromGitHub {
|
src = fetchFromGitHub {
|
||||||
owner = "lucc";
|
owner = "lucc";
|
||||||
repo = pname;
|
repo = pname;
|
||||||
rev = "v${version}";
|
rev = "v${version}";
|
||||||
sha256 = "1xy5387szfw0bp8dr7d4z33wd4xva7q219rvz8gc0vvv1vsy73va";
|
sha256 = "sha256-okYnPwuxU/syxcKIMUBc25r791D6Bug2w2axH4vvmAY=";
|
||||||
};
|
};
|
||||||
|
|
||||||
buildInputs = [
|
buildInputs = [
|
||||||
ncurses # for tput
|
ncurses # for tput
|
||||||
procps # for nvim_get_proc() which uses ps(1)
|
procps # for nvim_get_proc() which uses ps(1)
|
||||||
];
|
];
|
||||||
nativeBuildInputs = [ pandoc ];
|
nativeBuildInputs = [ scdoc ];
|
||||||
|
|
||||||
makeFlags = [ "PREFIX=$(out)" ];
|
makeFlags = [ "PREFIX=$(out)" ];
|
||||||
buildFlags = [ "nvimpager.configured" ];
|
buildFlags = [ "nvimpager.configured" "nvimpager.1" ];
|
||||||
preBuild = ''
|
preBuild = ''
|
||||||
patchShebangs nvimpager
|
patchShebangs nvimpager
|
||||||
substituteInPlace nvimpager --replace ':-nvim' ':-${neovim}/bin/nvim'
|
substituteInPlace nvimpager --replace ':-nvim' ':-${neovim}/bin/nvim'
|
||||||
|
# remove git command from makefile as we run from a tarball
|
||||||
|
# replace with actual timestamp of the commit
|
||||||
|
substituteInPlace makefile --replace '$(shell git log -1 --no-show-signature --pretty="%ct")' 1623019602
|
||||||
'';
|
'';
|
||||||
|
|
||||||
doCheck = true;
|
doCheck = true;
|
||||||
checkInputs = [ lua51Packages.busted util-linux neovim ];
|
checkInputs = [ lua51Packages.busted util-linux neovim ];
|
||||||
checkPhase = ''script -c "busted --lpath './?.lua' test"'';
|
checkPhase = ''
|
||||||
|
runHook preCheck
|
||||||
|
script -c "busted --lpath './?.lua' test"
|
||||||
|
runHook postCheck
|
||||||
|
'';
|
||||||
|
|
||||||
meta = with lib; {
|
meta = with lib; {
|
||||||
description = "Use neovim as pager";
|
description = "Use neovim as pager";
|
||||||
|
|
Loading…
Reference in a new issue