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


                 
              



         
                     
                  
                     





                         
                     

    

                                                   










                                                       
                    
                                     
                                                                          



                                                  
{ 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;
  };
}