guix-commits
[Top][All Lists]
Advanced

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

32/34: gnu: bcachefs-tools: Respect input rewriting.


From: guix-commits
Subject: 32/34: gnu: bcachefs-tools: Respect input rewriting.
Date: Tue, 18 Jul 2023 21:12:00 -0400 (EDT)

nckx pushed a commit to branch master
in repository guix.

commit 09c14288cfe3f0017965d503841a938116c3372b
Author: Tobias Geerinckx-Rice <me@tobias.gr>
AuthorDate: Sun Jul 16 02:00:00 2023 +0200

    gnu: bcachefs-tools: Respect input rewriting.
    
    * gnu/packages/file-systems.scm (bcachefs-tools)[arguments]: Rewrite the
    'promote-mount.bcachefs.sh phase to use SEARCH-INPUT-FILE.
---
 gnu/packages/file-systems.scm | 12 +++++++-----
 1 file changed, 7 insertions(+), 5 deletions(-)

diff --git a/gnu/packages/file-systems.scm b/gnu/packages/file-systems.scm
index 007203ae12..7788acd34e 100644
--- a/gnu/packages/file-systems.scm
+++ b/gnu/packages/file-systems.scm
@@ -614,16 +614,18 @@ from a mounted file system.")
                  (add-after 'install 'promote-mount.bcachefs.sh
                    ;; XXX The (optional) ‘mount.bcachefs’ requires rust:cargo.
                    ;; This shell alternative does the job well enough for now.
-                   (lambda _
+                   (lambda* (#:key inputs #:allow-other-keys)
+                     (define (whence file)
+                       (dirname (search-input-file inputs file)))
                      (with-directory-excursion (string-append #$output "/sbin")
                        (rename-file "mount.bcachefs.sh" "mount.bcachefs")
                        ;; WRAP-SCRIPT causes bogus ‘Insufficient arguments’ 
errors.
                        (wrap-program "mount.bcachefs"
                          `("PATH" ":" prefix
-                           ,(list (string-append #$output            "/sbin")
-                                  (string-append #$coreutils-minimal "/bin")
-                                  (string-append #$gawk              "/bin")
-                                  (string-append #$util-linux        
"/bin"))))))))))
+                           ,(list (getcwd)
+                                  (whence "bin/tail")
+                                  (whence "bin/awk")
+                                  (whence "bin/mount"))))))))))
       (native-inputs
        (append
          (list pkg-config



reply via email to

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