Revert "gnu: bcachefs-tools: Restyle format."

This reverts commit a5477e3a82.
This ‘guix style’d change does not improve readability, sometimes
reduces it, and awkwardly cramps horizontal space.
This commit is contained in:
Tobias Geerinckx-Rice 2023-09-24 02:00:00 +02:00
parent ce0cc6137d
commit f5e349ceb2
No known key found for this signature in database
GPG key ID: 0DB0FF884F556D79

View file

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