guix-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

01/01: gnu: ranger: Enable image support.


From: Rutger Helling
Subject: 01/01: gnu: ranger: Enable image support.
Date: Mon, 4 Jun 2018 10:35:09 -0400 (EDT)

rhelling pushed a commit to branch master
in repository guix.

commit 19b662ea7c53a28270a783f10ca033d8c9d2a954
Author: Rutger Helling <address@hidden>
Date:   Mon Jun 4 16:31:58 2018 +0200

    gnu: ranger: Enable image support.
    
    * gnu/packages/disk.scm (ranger)[inputs]: Add 'w3m'.
    [arguments]: Add wrapper for W3MIMGDISPLAY_PATH environment variable.
---
 gnu/packages/disk.scm | 20 +++++++++++++++++++-
 1 file changed, 19 insertions(+), 1 deletion(-)

diff --git a/gnu/packages/disk.scm b/gnu/packages/disk.scm
index f5776eb..bdd24a3 100644
--- a/gnu/packages/disk.scm
+++ b/gnu/packages/disk.scm
@@ -11,6 +11,7 @@
 ;;; Copyright © 2017 Stefan Reichör <address@hidden>
 ;;; Copyright © 2018 Vasile Dumitrascu <address@hidden>
 ;;; Copyright © 2018 Eric Bavier <address@hidden>
+;;; Copyright © 2018 Rutger Helling <address@hidden>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -53,6 +54,7 @@
   #:use-module (gnu packages guile)
   #:use-module (gnu packages compression)
   #:use-module (gnu packages vim)
+  #:use-module (gnu packages w3m)
   #:use-module (gnu packages xml))
 
 (define-public parted
@@ -516,12 +518,28 @@ Duperemove can also take input from the @command{fdupes} 
program.")
                (base32
                 "1lnzkrxcnlwnyi3z0v8ybyp8d5rm26qm35rr68kbs2lbs06inha0"))))
     (build-system python-build-system)
+    (inputs
+     `(("w3m" ,w3m)))
     (native-inputs                      ;for tests
      `(("python-pytest" ,python-pytest)
        ("python-pylint" ,python-pylint)
        ("python-flake8" ,python-flake8)
        ("which" ,which)))
-    (arguments '(#:test-target "test"))
+    (arguments
+     '(#:test-target "test"
+       #:phases
+       (modify-phases %standard-phases
+         (add-after 'configure 'wrap-program
+           ;; Tell 'ranger' where 'w3mimgdisplay' is.
+           (lambda* (#:key inputs outputs #:allow-other-keys)
+             (let* ((out  (assoc-ref outputs "out"))
+                    (ranger (string-append out "/bin/ranger"))
+                    (w3m (assoc-ref inputs "w3m"))
+                    (w3mimgdisplay (string-append w3m
+                                   "/libexec/w3m/w3mimgdisplay")))
+               (wrap-program ranger
+                 `("W3MIMGDISPLAY_PATH" ":" prefix (,w3mimgdisplay)))
+               #t))))))
     (home-page "https://ranger.github.io/";)
     (synopsis "Console file manager")
     (description "ranger is a console file manager with Vi key bindings.  It



reply via email to

[Prev in Thread] Current Thread [Next in Thread]