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.
This commit is contained in:
Tobias Geerinckx-Rice 2023-07-16 02:00:00 +02:00
parent 31733c9090
commit 09c14288cf
No known key found for this signature in database
GPG key ID: 0DB0FF884F556D79

View file

@ -614,16 +614,18 @@ (define-public bcachefs-tools
(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