Archived
1
0
Fork 0

gnu: bcachefs-tools: Restyle format.

* gnu/packages/file-systems.scm (bcachefs-tools): Reformat with 'guix style'
and manually break some long lines.

Signed-off-by: Christopher Baines <mail@cbaines.net>
This commit is contained in:
Ahmad Draidi 2023-09-17 10:38:01 +04:00 committed by Christopher Baines
parent 7efa17af88
commit a5477e3a82
No known key found for this signature in database
GPG key ID: 5E28A33B0B84F577

View file

@ -575,84 +575,89 @@ from a mounted file system.")
(license license:gpl2+))) (license license:gpl2+)))
(define-public bcachefs-tools (define-public bcachefs-tools
(package (package
(name "bcachefs-tools") (name "bcachefs-tools")
(version "1.2") (version "1.2")
(source (source (origin
(origin (method git-fetch)
(method git-fetch) (uri (git-reference
(uri (git-reference (url "https://evilpiepirate.org/git/bcachefs-tools.git")
(url "https://evilpiepirate.org/git/bcachefs-tools.git") (commit (string-append "v" version))))
(commit (string-append "v" version)))) (file-name (git-file-name name version))
(file-name (git-file-name name version)) (sha256
(sha256 (base32
(base32 "0wgqclkkdkqis3aq6wp0kcn1bsynybm3dnpcf7vlcvx85kdmcxg8")))) "0wgqclkkdkqis3aq6wp0kcn1bsynybm3dnpcf7vlcvx85kdmcxg8"))))
(build-system gnu-build-system) (build-system gnu-build-system)
(arguments (arguments
(list #:make-flags (list #:make-flags #~(list (string-append "VERSION="
#~(list (string-append "VERSION=" #$version) ; v…-nogit otherwise #$version) ;v…-nogit otherwise
(string-append "PREFIX=" #$output) (string-append "PREFIX="
"INITRAMFS_DIR=$(PREFIX)/share/initramfs-tools" #$output)
(string-append "CC=" #$(cc-for-target)) "INITRAMFS_DIR=$(PREFIX)/share/initramfs-tools"
(string-append "PKG_CONFIG=" #$(pkg-config-for-target)) (string-append "CC="
;; This will be less of an option in the future, as more #$(cc-for-target))
;; code gets rewritten in Rust. (string-append "PKG_CONFIG="
"NO_RUST=better") #$(pkg-config-for-target))
#:phases ;; This will be less of an option in the future, as more
#~(modify-phases %standard-phases ;; code gets rewritten in Rust.
(delete 'configure) ; no configure script "NO_RUST=better")
(replace 'check #:phases #~(modify-phases %standard-phases
;; The test suite is moribund upstream (never been useful), (delete 'configure) ;no configure script
;; but let's keep running it as a sanity check until then. (replace 'check
(lambda* (#:key tests? make-flags #:allow-other-keys) ;; The test suite is moribund upstream (never been
(when tests? ;; useful), but let's keep running it as a sanity
;; We must manually build the test_helper first. ;; check until then.
(apply invoke "make" "tests" make-flags) (lambda* (#:key tests? make-flags #:allow-other-keys)
(invoke (string-append (when tests?
#$(this-package-native-input "python-pytest") ;; We must manually build the test_helper first.
"/bin/pytest") "-k" (apply invoke "make" "tests" make-flags)
;; These fail (invalid argument) on kernels (invoke (string-append #$(this-package-native-input
;; with a previous bcachefs version. "python-pytest")
(string-append "not test_format and " "/bin/pytest") "-k"
"not test_fsck and " ;; These fail (invalid argument) on kernels
"not test_list and " ;; with a previous bcachefs version.
"not test_list_inodes and " (string-append "not test_format and "
"not test_list_dirent"))))) "not test_fsck and "
(add-after 'install 'patch-shell-wrappers "not test_list and "
;; These are overcomplicated wrappers that invoke readlink(1) "not test_list_inodes and "
;; to exec the appropriate bcachefs(8) subcommand. We can "not test_list_dirent")))))
;; simply patch in the latter file name directly, and do. (add-after 'install 'patch-shell-wrappers
(lambda _ ;; These are overcomplicated wrappers that invoke readlink(1)
(let ((sbin/ (string-append #$output "/sbin/"))) ;; to exec the appropriate bcachefs(8) subcommand. We can
(substitute* (find-files sbin/ (lambda (file stat) ;; simply patch in the latter file name directly, and do.
(not (elf-file? file)))) (lambda _
(("SDIR=.*") "") (let ((sbin/ (string-append #$output "/sbin/")))
(("\\$\\{SDIR.*}/") sbin/)))))))) (substitute* (find-files sbin/
(native-inputs (lambda (file stat)
(cons* pkg-config (not (elf-file? file))))
;; For generating documentation with rst2man. (("SDIR=.*")
python "")
python-docutils (("\\$\\{SDIR.*}/")
;; For tests. sbin/))))))))
python-pytest (native-inputs (cons* pkg-config
(if (member (%current-system) (package-supported-systems valgrind)) ;; For generating documentation with rst2man.
(list valgrind) python
'()))) python-docutils
(inputs ;; For tests.
(list eudev python-pytest
keyutils (if (member (%current-system)
libaio (package-supported-systems valgrind))
libscrypt (list valgrind)
libsodium '())))
liburcu (inputs (list eudev
`(,util-linux "lib") keyutils
lz4 libaio
zlib libscrypt
`(,zstd "lib"))) libsodium
(home-page "https://bcachefs.org/") liburcu
(synopsis "Tools to create and manage bcachefs file systems") `(,util-linux "lib")
(description lz4
"The bcachefs-tools are command-line utilities for creating, checking, zlib
`(,zstd "lib")))
(home-page "https://bcachefs.org/")
(synopsis "Tools to create and manage bcachefs file systems")
(description
"The bcachefs-tools are command-line utilities for creating, checking,
and otherwise managing bcachefs file systems. and otherwise managing bcachefs file systems.
Bcachefs is a @acronym{CoW, copy-on-write} file system supporting native Bcachefs is a @acronym{CoW, copy-on-write} file system supporting native
@ -662,7 +667,7 @@ multiple block devices for replication and/or performance, similar to RAID.
In addition, bcachefs provides all the functionality of bcache, a block-layer In addition, bcachefs provides all the functionality of bcache, a block-layer
caching system, and lets you assign different roles to each device based on its caching system, and lets you assign different roles to each device based on its
performance and other characteristics.") performance and other characteristics.")
(license license:gpl2+))) (license license:gpl2+)))
(define-public bcachefs-tools/static (define-public bcachefs-tools/static
(package (package