gnu: lesspipe: Patch paths to inputs.
authorMichael Rohleder <mike@rohleder.de>
Sat, 22 Aug 2020 16:40:12 +0000 (18:40 +0200)
committerLeo Famulari <leo@famulari.name>
Sat, 22 Aug 2020 21:45:42 +0000 (17:45 -0400)
* gnu/packages/less.scm (lesspipe)[arguments]: Add phase to patch
paths to tput and file.

Signed-off-by: Leo Famulari <leo@famulari.name>
gnu/packages/less.scm

index f6ee355..7c5107d 100644 (file)
@@ -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