Archived
1
0
Fork 0

gnu: bcachefs-tools: Use G-expressions.

* gnu/packages/file-systems.scm (bcachefs-tools)[arguments]:
Rewrite as G-expressions.
This commit is contained in:
Tobias Geerinckx-Rice 2021-12-20 01:05:25 +01:00
parent ba19307af0
commit 5dca6c8dfc
No known key found for this signature in database
GPG key ID: 0DB0FF884F556D79

View file

@ -27,6 +27,7 @@
;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>. ;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
(define-module (gnu packages file-systems) (define-module (gnu packages file-systems)
#:use-module (guix gexp)
#:use-module ((guix licenses) #:prefix license:) #:use-module ((guix licenses) #:prefix license:)
#:use-module (guix packages) #:use-module (guix packages)
#:use-module (guix download) #:use-module (guix download)
@ -420,34 +421,30 @@ from a mounted file system.")
(base32 "1ixb1fk58yjk8alpcf9a7h0fnkvpbsjxd766iz9h7qa6r1r77a6c")))) (base32 "1ixb1fk58yjk8alpcf9a7h0fnkvpbsjxd766iz9h7qa6r1r77a6c"))))
(build-system gnu-build-system) (build-system gnu-build-system)
(arguments (arguments
`(#:make-flags (list #:make-flags
(list ,(string-append "VERSION=" version) ; bogus vX.Y-nogit otherwise #~(list (string-append "VERSION=" #$version) ; v…-nogit otherwise
(string-append "PREFIX=" (assoc-ref %outputs "out")) (string-append "PREFIX=" #$output)
"INITRAMFS_DIR=$(PREFIX)/share/initramfs-tools" "INITRAMFS_DIR=$(PREFIX)/share/initramfs-tools"
,(string-append "CC=" (cc-for-target)) (string-append "CC=" #$(cc-for-target))
,(string-append "PKG_CONFIG=" (pkg-config-for-target)) (string-append "PKG_CONFIG=" #$(pkg-config-for-target))
"PYTEST=pytest") "PYTEST=pytest")
#:phases #:phases
(modify-phases %standard-phases #~(modify-phases %standard-phases
(delete 'configure) ; no configure script (delete 'configure) ; no configure script
(add-after 'install 'promote-mount.bcachefs.sh (add-after 'install 'promote-mount.bcachefs.sh
;; XXX The (optional) mount.bcachefs helper requires rust:cargo. ;; XXX The (optional) mount.bcachefs requires rust:cargo.
;; This alternative shell script does the job well enough for now. ;; This shell alternative does the job well enough for now.
(lambda* (#:key inputs outputs #:allow-other-keys) (lambda _
(let ((out (assoc-ref outputs "out"))) (with-directory-excursion (string-append #$output "/sbin")
(with-directory-excursion (string-append out "/sbin") (rename-file "mount.bcachefs.sh" "mount.bcachefs")
(rename-file "mount.bcachefs.sh" "mount.bcachefs") ;; WRAP-SCRIPT causes bogus Insufficient arguments errors.
;; WRAP-SCRIPT causes bogus Insufficient arguments errors. (wrap-program "mount.bcachefs"
(wrap-program "mount.bcachefs" `("PATH" ":" prefix
`("PATH" ":" prefix ,(list (string-append #$output "/sbin")
,(cons (string-append out "/sbin") (string-append #$coreutils-minimal "/bin")
(map (lambda (input) (string-append #$gawk "/bin")
(string-append (assoc-ref inputs input) (string-append #$util-linux "/bin"))))))))
"/bin")) #:tests? #f)) ; XXX 6 valgrind tests fail
(list "coreutils"
"gawk"
"util-linux"))))))))))
#:tests? #f)) ; XXX 6 valgrind tests fail
(native-inputs (native-inputs
(list pkg-config (list pkg-config
;; For tests. ;; For tests.