diff --git a/gnu/packages/less.scm b/gnu/packages/less.scm index f6ee355b68fa27143eacdadccd12b8f43db2d128..7c5107de092a97e9766767764649643ad27f4c69 100644 --- a/gnu/packages/less.scm +++ b/gnu/packages/less.scm @@ -80,7 +80,17 @@ (define-public lesspipe (invoke "./configure" (string-append "--prefix=" out) "--yes") - #t)))))) + #t))) + (add-before 'install 'patch-tput-and-file + (lambda* (#:key inputs #:allow-other-keys) + (substitute* "lesspipe.sh" + (("tput colors") + (string-append (assoc-ref inputs "ncurses") + "/bin/tput colors")) + (("file -") + (string-append (assoc-ref inputs "file") + "/bin/file -"))) + #t))))) (inputs `(("file" ,file) ("ncurses" ,ncurses))) ; for tput