guix_mirror_bot pushed a commit to branch master
in repository guix.
commit 46870ecc0e01e253012d0bac90ef270cd163e745
Author: Nguyễn Gia Phong <[email protected]>
AuthorDate: Wed Jan 28 13:57:43 2026 +0900
gnu: ranger: Set path to file.
While file is an optional dependency, it is required to determine file
types and open files.
* gnu/packages/disk.scm (ranger)[inputs]: Add file.
[#:phases]: Add ‘set-paths’.
Change-Id: I35a462d949cf1aca5896574a1ff19525d3c435f0
Signed-off-by: Liliana Marie Prikler <[email protected]>
---
gnu/packages/disk.scm | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/gnu/packages/disk.scm b/gnu/packages/disk.scm
index 762280cb87..00443a0ab9 100644
--- a/gnu/packages/disk.scm
+++ b/gnu/packages/disk.scm
@@ -1123,6 +1123,13 @@ Duperemove can also take input from the @command{fdupes}
program.")
(list
#:phases
#~(modify-phases %standard-phases
+ (add-after 'unpack 'set-paths
+ (lambda _
+ (substitute* (find-files "ranger" "\\.py$")
+ (("\"file\"")
+ (simple-format #f "~s"
+ #$(file-append (this-package-input "file")
+ "/bin/file"))))))
(add-after 'install 'wrap-program
;; Tell 'ranger' where 'w3mimgdisplay' is.
(lambda _
@@ -1134,7 +1141,7 @@ Duperemove can also take input from the @command{fdupes}
program.")
`("W3MIMGDISPLAY_PATH" ":" prefix
(,w3mimgdisplay)))))))))
(native-inputs (list python-pytest python-setuptools python-wheel))
- (inputs (list bash-minimal w3m))
+ (inputs (list bash-minimal file w3m))
(home-page "https://ranger.github.io/")
(synopsis "Console file manager")
(description