567e8dfd8e
This commit was created by a combination of scripts and tools: - an ast-grep script to prefix things in meta with `lib.`, - a modified nixf-diagnose / nixf combination to remove unused `with lib;`, and - regular nixfmt. Co-authored-by: Wolfgang Walther <walther@technowledgy.de>
46 lines
725 B
Nix
46 lines
725 B
Nix
{
|
|
lib,
|
|
stdenv,
|
|
fetchFromGitHub,
|
|
coreutils,
|
|
sharutils,
|
|
version,
|
|
sha256,
|
|
}:
|
|
|
|
stdenv.mkDerivation {
|
|
inherit version;
|
|
pname = "vimpager";
|
|
|
|
src = fetchFromGitHub {
|
|
inherit sha256;
|
|
|
|
owner = "rkitover";
|
|
repo = "vimpager";
|
|
rev = version;
|
|
};
|
|
|
|
nativeBuildInputs = [ sharutils ]; # for uuencode
|
|
buildInputs = [ coreutils ];
|
|
|
|
makeFlags = [
|
|
"PREFIX=$(out)"
|
|
];
|
|
|
|
buildPhase = ''
|
|
sed -i 's,/bin/cat,${coreutils}/bin/cat,g' vimpager
|
|
make
|
|
'';
|
|
|
|
meta = {
|
|
description = "Use Vim as PAGER";
|
|
homepage = "https://www.vim.org/scripts/script.php?script_id=1723";
|
|
license = with lib.licenses; [
|
|
bsd2
|
|
mit
|
|
vim
|
|
];
|
|
platforms = lib.platforms.unix;
|
|
};
|
|
}
|