all messages for Guix-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* [bug#56657] [PATCH] gnu: ranger: Add dependency file
@ 2022-07-20  8:01 guix-patches--- via
  2022-07-21  6:50 ` Liliana Marie Prikler
  0 siblings, 1 reply; 4+ messages in thread
From: guix-patches--- via @ 2022-07-20  8:01 UTC (permalink / raw)
  To: 56657; +Cc: Nguyễn Gia Phong

While file is an optional dependency, without it
file type determination and opening does not work out of the box.
---
 gnu/packages/disk.scm | 7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)

diff --git a/gnu/packages/disk.scm b/gnu/packages/disk.scm
index 47b15e588f79..58bd3db3812c 100644
--- a/gnu/packages/disk.scm
+++ b/gnu/packages/disk.scm
@@ -24,6 +24,7 @@
 ;;; Copyright © 2021 Justin Veilleux <terramorpha@cock.li>
 ;;; Copyright © 2014, 2022 Ludovic Courtès <ludo@gnu.org>
 ;;; Copyright © 2022 Maxim Cournoyer <maxim.cournoyer@gmail.com>
+;;; Copyright © 2022 Nguyễn Gia Phong <mcsinyx@disroot.org>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -800,7 +801,7 @@ (define-public ranger
                 "0lfjrpv3z4h0knd3v94fijrw2zjba51mrp3mjqx2c98wr428l26f"))))
     (build-system python-build-system)
     (inputs
-     (list w3m))
+     (list file w3m))
     (native-inputs
      (list which
            ;; For tests.
@@ -815,11 +816,13 @@ (define-public ranger
            (lambda* (#:key inputs outputs #:allow-other-keys)
              (let* ((out  (assoc-ref outputs "out"))
                     (ranger (string-append out "/bin/ranger"))
+                    (file (assoc-ref inputs "file"))
                     (w3m (assoc-ref inputs "w3m"))
                     (w3mimgdisplay (string-append w3m
                                    "/libexec/w3m/w3mimgdisplay")))
                (wrap-program ranger
-                 `("W3MIMGDISPLAY_PATH" ":" prefix (,w3mimgdisplay)))
+                 `("W3MIMGDISPLAY_PATH" ":" prefix (,w3mimgdisplay))
+                 `("PATH" ":" prefix ,(list (string-append file "/bin"))))
                #t)))
          (replace 'check
            ;; The default check phase simply prints 'Ran 0 tests in 0.000s'.
-- 
2.37.0





^ permalink raw reply related	[flat|nested] 4+ messages in thread

* [bug#56657] [PATCH] gnu: ranger: Add dependency file
  2022-07-20  8:01 [bug#56657] [PATCH] gnu: ranger: Add dependency file guix-patches--- via
@ 2022-07-21  6:50 ` Liliana Marie Prikler
  2022-07-26  7:43   ` guix-patches--- via
  0 siblings, 1 reply; 4+ messages in thread
From: Liliana Marie Prikler @ 2022-07-21  6:50 UTC (permalink / raw)
  To: Nguyễn Gia Phong, 56657

Am Mittwoch, dem 20.07.2022 um 17:01 +0900 schrieb Nguyễn Gia Phong:
> While file is an optional dependency, without it
> file type determination and opening does not work out of the box.
Rather than patching PATH, you should use substitute* to hardcode the
reference.  Also, do write a ChangeLog style commit message.

Cheers




^ permalink raw reply	[flat|nested] 4+ messages in thread

* [bug#56657] [PATCH] gnu: ranger: Add dependency file
  2022-07-21  6:50 ` Liliana Marie Prikler
@ 2022-07-26  7:43   ` guix-patches--- via
  2022-07-26  7:48     ` Liliana Marie Prikler
  0 siblings, 1 reply; 4+ messages in thread
From: guix-patches--- via @ 2022-07-26  7:43 UTC (permalink / raw)
  To: Liliana Marie Prikler, 56657

On Thu Jul 21, 2022 at 8:50 AM +0200, Liliana Marie Prikler wrote:
> Rather than patching PATH, you should use substitute*
> to hardcode the reference.

Coming from Nix, I don't get why is it preferred.
Shouldn't users be able to override runtime dependencies at runtime,
e.g. via a custom wrapper script?

If that is the case, I suppose the correct wrapper would be

(wrap-program ...
  '("PATH" suffix ,(list (string-append file "/bin"))))

> Also, do write a ChangeLog style commit message.

Thanks, I probably missed this reading the contrib guide.




^ permalink raw reply	[flat|nested] 4+ messages in thread

* [bug#56657] [PATCH] gnu: ranger: Add dependency file
  2022-07-26  7:43   ` guix-patches--- via
@ 2022-07-26  7:48     ` Liliana Marie Prikler
  0 siblings, 0 replies; 4+ messages in thread
From: Liliana Marie Prikler @ 2022-07-26  7:48 UTC (permalink / raw)
  To: Nguyễn Gia Phong, 56657

Am Dienstag, dem 26.07.2022 um 16:43 +0900 schrieb Nguyễn Gia Phong:
> On Thu Jul 21, 2022 at 8:50 AM +0200, Liliana Marie Prikler wrote:
> > Rather than patching PATH, you should use substitute*
> > to hardcode the reference.
> 
> Coming from Nix, I don't get why is it preferred.
> Shouldn't users be able to override runtime dependencies at runtime,
> e.g. via a custom wrapper script?
In Guix we prefer not to rely on the environment because that breaks
the case of pure shells.  We have transformations, which are more
powerful than wrapper scripts.




^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2022-07-26 15:45 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-07-20  8:01 [bug#56657] [PATCH] gnu: ranger: Add dependency file guix-patches--- via
2022-07-21  6:50 ` Liliana Marie Prikler
2022-07-26  7:43   ` guix-patches--- via
2022-07-26  7:48     ` Liliana Marie Prikler

Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/guix.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.