summary refs log tree commit diff
path: root/gnu/packages/less.scm
diff options
context:
space:
mode:
authorMichael Rohleder <mike@rohleder.de>2020-08-22 18:40:12 +0200
committerLeo Famulari <leo@famulari.name>2020-08-22 17:45:42 -0400
commit5a4990b98260ba85b8b93d6ac43d871e370d6983 (patch)
tree670446c7ca13a3c374134ad51957216c474307cc /gnu/packages/less.scm
parent1bb4fd64b7bbe5a17eda6f0ca8105283c038f7c8 (diff)
downloadguix-5a4990b98260ba85b8b93d6ac43d871e370d6983.tar.gz
gnu: lesspipe: Patch paths to inputs.
* gnu/packages/less.scm (lesspipe)[arguments]: Add phase to patch
paths to tput and file.

Signed-off-by: Leo Famulari <leo@famulari.name>
Diffstat (limited to 'gnu/packages/less.scm')
-rw-r--r--gnu/packages/less.scm12
1 files changed, 11 insertions, 1 deletions
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