nixpkgs/pkgs/tools/misc/vimpager/build.nix

40 lines
686 B
Nix
Raw Normal View History

{ stdenv
, fetchFromGitHub
, coreutils
, sharutils
, version
, sha256
}:
2019-08-13 22:52:01 +01:00
stdenv.mkDerivation {
inherit version;
pname = "vimpager";
src = fetchFromGitHub {
inherit sha256;
owner = "rkitover";
repo = "vimpager";
2019-09-09 00:38:31 +01:00
rev = version;
};
buildInputs = [ coreutils sharutils ]; # for uuencode
makeFlags = [
"PREFIX=$(out)"
];
buildPhase = ''
sed -i 's,/bin/cat,${coreutils}/bin/cat,g' vimpager
make
'';
meta = with stdenv.lib; {
description = "Use Vim as PAGER";
homepage = "https://www.vim.org/scripts/script.php?script_id=1723";
license = with licenses; [ bsd2 mit vim ];
platforms = platforms.unix;
};
}