gnu: bcachefs-tools: Support FUSE.

* gnu/packages/file-systems.scm (bcachefs-tools)[arguments]:
Add a new 'enable-fuse phase.
[inputs]: Add fuse.

Change-Id: Ie82a361a4a6bfd0af7ce9c915bdc468f7aa06df2
This commit is contained in:
Tobias Geerinckx-Rice 2024-08-18 02:00:00 +02:00
parent a21ddf8192
commit d030e42976
No known key found for this signature in database
GPG key ID: 0DB0FF884F556D79

View file

@ -723,7 +723,8 @@ (define bcachefs-tools-minimal
(license license:gpl2+))) (license license:gpl2+)))
(define-public bcachefs-tools (define-public bcachefs-tools
;; The final public package with shell completion even when cross-compiling. ;; The final public package with shell completion even when cross-compiling,
;; as well as optional features such as FUSE (bcachefs fusemount).
(package (package
(inherit bcachefs-tools-minimal) (inherit bcachefs-tools-minimal)
(name "bcachefs-tools") (name "bcachefs-tools")
@ -737,6 +738,10 @@ (define-public bcachefs-tools
(srfi srfi-26))) (srfi srfi-26)))
((#:phases phases #~%standard-phases) ((#:phases phases #~%standard-phases)
#~(modify-phases #$phases #~(modify-phases #$phases
(add-before 'build 'enable-fuse
(lambda _
;; This must be an environment variable, not a make flag!
(setenv "BCACHEFS_FUSE" "1")))
(add-after 'install 'install-completions (add-after 'install 'install-completions
(lambda* (#:key native-inputs #:allow-other-keys) (lambda* (#:key native-inputs #:allow-other-keys)
(define bcachefs (define bcachefs
@ -763,7 +768,10 @@ (define (output-completions shell file)
(append (package-native-inputs bcachefs-tools-minimal) (append (package-native-inputs bcachefs-tools-minimal)
(if (%current-target-system) (if (%current-target-system)
(list bcachefs-tools-minimal) (list bcachefs-tools-minimal)
(list)))))) (list))))
(inputs
(modify-inputs (package-inputs bcachefs-tools-minimal)
(append fuse)))))
(define-public bcachefs-tools-minimal/static (define-public bcachefs-tools-minimal/static
;; The static variant is public for consistency with the other file system ;; The static variant is public for consistency with the other file system