summary refs log blame commit diff
path: root/pkgs/tools/misc/vimpager/build.nix
blob: 19cc6cd2234fe710f8bb4c0306cfb8e8555b3951 (plain) (tree)
1
2
3
4
5
6
7
8
9







                 
                     
                  
                     



























                                                                            
{ stdenv
, fetchFromGitHub
, coreutils
, sharutils
, version
, sha256
}:

stdenv.mkDerivation {
  inherit version;
  pname = "vimpager";

  src = fetchFromGitHub {
    inherit sha256;

    owner  = "rkitover";
    repo   = "vimpager";
    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;
  };
}