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

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

42 lines
726 B
Nix
Raw Normal View History

{ lib, stdenv
, fetchFromGitHub
, coreutils
, sharutils
, runtimeShell
, version
, sha256
}:
2019-08-13 21:52:01 +00:00
stdenv.mkDerivation {
inherit version;
pname = "vimpager";
src = fetchFromGitHub {
inherit sha256;
owner = "rkitover";
repo = "vimpager";
2019-09-08 23:38:31 +00:00
rev = version;
};
2021-09-17 19:50:21 +00:00
nativeBuildInputs = [ sharutils ]; # for uuencode
buildInputs = [ coreutils ];
makeFlags = [
"PREFIX=$(out)"
];
buildPhase = ''
sed -i 's,/bin/cat,${coreutils}/bin/cat,g' vimpager
make
'';
meta = with 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;
};
}