3
0
Fork 0
forked from mirrors/nixpkgs
nixpkgs/pkgs/tools/misc/vimpager/build.nix
arcnmx fda25f88d2 vimpager: supply runtimeShell to Makefile
Cross-compiles will otherwise detect an incorrect shell.
2021-09-22 15:44:56 -07:00

42 lines
726 B
Nix

{ lib, stdenv
, fetchFromGitHub
, coreutils
, sharutils
, runtimeShell
, 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 = 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;
};
}