summary refs log tree commit diff
diff options
context:
space:
mode:
authorRaghav Gururajan <raghavgururajan@disroot.org>2020-05-01 12:45:03 -0400
committerDanny Milosavljevic <dannym@scratchpost.org>2020-05-01 19:19:00 +0200
commit7dfc7c5398c16bdf27acf260c71f905d13bb3a9c (patch)
treeba594dbd5beadc505357ee041237b21b77cd7c76
parent7e5c7677056610fa45dde7415ccbf07525d00e79 (diff)
downloadguix-7dfc7c5398c16bdf27acf260c71f905d13bb3a9c.tar.gz
gnu: xfe: Fix configuration and icons.
* gnu/packages/disk.scm (xfe)[arguments]<#:make-flags>: Remove
BASH_COMPLETION_DIR.
[arguments]<#:phases>[patch-xferc-path]: Remove phase.
[arguments]<#:phases>[patch-xfe-paths]: New phase.

Signed-off-by: Danny Milosavljevic <dannym@scratchpost.org>
-rw-r--r--gnu/packages/disk.scm35
1 files changed, 23 insertions, 12 deletions
diff --git a/gnu/packages/disk.scm b/gnu/packages/disk.scm
index 2b9ba8e38d..f557c57749 100644
--- a/gnu/packages/disk.scm
+++ b/gnu/packages/disk.scm
@@ -936,8 +936,7 @@ since they are better handled by external tools.")
        (method url-fetch)
        (uri
         (string-append "https://sourceforge.net/projects/xfe/files/xfe/"
-                       version
-                       "/xfe-" version ".tar.gz"))
+                       version "/xfe-" version ".tar.gz"))
        (sha256
         (base32 "1fl51k5jm2vrfc2g66agbikzirmp0yb0lqhmsssixfb4mky3hpzs"))))
     (build-system gnu-build-system)
@@ -955,20 +954,32 @@ since they are better handled by external tools.")
     (arguments
      `(#:phases
        (modify-phases %standard-phases
-         (add-after 'unpack 'patch-xferc-path
+         (add-after 'unpack 'patch-xfe-paths
            (lambda* (#:key outputs #:allow-other-keys)
-             (let* ((out     (assoc-ref outputs "out"))
-                    (xferc   (string-append out "/share/xfe/xferc")))
+             (let*
+                 ((out     (assoc-ref outputs "out"))
+                  (share   (string-append out "/share"))
+                  (xferc   (string-append out "/share/xfe/xferc"))
+                  (xfe-theme   (string-append out "/share/xfe/icons/xfe-theme")))
+               ;; Correct path for xfe registry.
+               (substitute* "src/foxhacks.cpp"
+                 (("/etc:/usr/share:/usr/local/share") share))
+               ;; Correct path for xfe configuration.
                (substitute* "src/XFileExplorer.cpp"
-                 (("/usr/share/xfe/xferc") xferc))
-               #t))))
-       #:make-flags
-       (let ((out (assoc-ref %outputs "out")))
-         (list (string-append "BASH_COMPLETION_DIR=" out
-                              "/share/bash-completion/completions")))))
+                 (("/usr/share/xfe/xferc") xferc)
+                 (("/usr/local/share/xfe/xferc") xferc)
+                 (("/opt/local/share/xfe/xferc") xferc))
+               ;; Correct path for xfe icons.
+               (substitute* "src/xfedefs.h"
+                 (((string-append
+                    "~/.config/xfe/icons/xfe-theme:"
+                    "/usr/local/share/xfe/icons/xfe-theme:"
+                    "/usr/share/xfe/icons/xfe-theme"))
+                  xfe-theme))
+               #t))))))
     (synopsis "File Manager for X-Based Graphical Systems")
     (description"XFE (X File Explorer) is a file manager for X.  It is based on
 the popular but discontinued, X Win Commander.  It aims to be the file manager
 of choice for all light thinking Unix addicts!")
     (home-page "http://roland65.free.fr/xfe/")
-    (license license:gpl2+)))
+    (license license:gpl2+)))
\ No newline at end of file