diff mbox series

[bug#42988] gnu: lesspipe: Patch paths to inputs.

Message ID 20200822164012.8389-1-mike@rohleder.de
State Accepted
Headers show
Series [bug#42988] gnu: lesspipe: Patch paths to inputs. | expand

Checks

Context Check Description
cbaines/applying patch fail View Laminar job

Commit Message

Michael Rohleder Aug. 22, 2020, 4:40 p.m. UTC
* gnu/packages/less.scm (lesspipe)[arguments]: Add phase to patch
paths to tput and file.
---
 gnu/packages/less.scm | 12 +++++++++++-
 1 file changed, 11 insertions(+), 1 deletion(-)

Comments

Leo Famulari Aug. 22, 2020, 9:46 p.m. UTC | #1
On Sat, Aug 22, 2020 at 06:40:12PM +0200, Michael Rohleder wrote:
> * gnu/packages/less.scm (lesspipe)[arguments]: Add phase to patch
> paths to tput and file.

Thanks! Pushed as 5a4990b98260ba85b8b93d6ac43d871e370d6983
diff mbox series

Patch

diff --git a/gnu/packages/less.scm b/gnu/packages/less.scm
index f6ee355b68..7c5107de09 100644
--- a/gnu/packages/less.scm
+++ b/gnu/packages/less.scm
@@ -80,7 +80,17 @@  text editors.")
                         (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