lesspipe: add dependency on ncurses; actually pull in deps and put them on path

This commit is contained in:
snaar 2018-07-23 14:32:39 -04:00
parent e0d5f644ac
commit c6bc77d30e

View file

@ -1,11 +1,12 @@
{ stdenv, fetchFromGitHub, perl, file }:
{ stdenv, lib, fetchFromGitHub, makeWrapper, perl, file, ncurses }:
stdenv.mkDerivation rec {
name = "lesspipe-${version}";
version = "1.82";
buildInputs = [ perl ];
buildInputs = [ makeWrapper perl ];
preConfigure = "patchShebangs .";
preFixupPhases = ["wrapWithDepsPhase"];
src = fetchFromGitHub {
owner = "wofr06";
@ -14,6 +15,10 @@ stdenv.mkDerivation rec {
sha256 = "0vb7bpap8vy003ha10hc7hxl17y47sgdnrjpihgqxkn8k0bfqbbq";
};
wrapWithDepsPhase = ''
wrapProgram $out/bin/lesspipe.sh --prefix PATH ":" ${lib.makeBinPath [ file ncurses ]}
'';
meta = with stdenv.lib; {
description = "A preprocessor for less";
longDescription = ''