gnu: btrfs-progs: Use new style inputs and gexps.

* gnu/packages/linux.scm (btrfs-progs)[arguments]: Use new style and gexps.
  [inputs]: Use new style.

Signed-off-by: Ludovic Courtès <ludo@gnu.org>
This commit is contained in:
Denis 'GNUtoo' Carikli 2023-05-10 18:39:23 +02:00 committed by Ludovic Courtès
parent 255b5b81db
commit 5d84a90694
No known key found for this signature in database
GPG key ID: 090B11993D9AEBB5

View file

@ -5925,60 +5925,58 @@ (define-public btrfs-progs
(build-system gnu-build-system) (build-system gnu-build-system)
(outputs '("out" "static")) ;static versions of the binaries in "out" (outputs '("out" "static")) ;static versions of the binaries in "out"
(arguments (arguments
'(#:configure-flags (list
;; The Python support was never actually installed by previous #:configure-flags
;; versions of this package, but did prevent cross-compilation. ;; The Python support was never actually installed by previous
(list "--disable-python") ;; versions of this package, but did prevent cross-compilation.
#:phases (modify-phases %standard-phases #~(list "--disable-python")
(add-after 'unpack 'patch-makefile #:phases #~(modify-phases %standard-phases
(lambda* (#:key outputs #:allow-other-keys) (add-after 'unpack 'patch-makefile
(substitute* "Makefile" (lambda* (#:key outputs #:allow-other-keys)
(("\\$\\(DESTDIR\\)\\$\\(udevruledir\\)") (substitute* "Makefile"
(string-append (assoc-ref outputs "out") (("\\$\\(DESTDIR\\)\\$\\(udevruledir\\)")
"/lib/udev/rules.d"))))) (string-append (assoc-ref outputs "out")
(add-after 'build 'build-static "/lib/udev/rules.d")))))
(lambda _ (add-after 'build 'build-static
(invoke "make" "static"))) (lambda _
(add-after 'install 'install-bash-completion (invoke "make" "static")))
(lambda* (#:key outputs #:allow-other-keys) (add-after 'install 'install-bash-completion
(let* ((out (assoc-ref outputs "out")) (lambda* (#:key outputs #:allow-other-keys)
(bashcomp (string-append out (let* ((out (assoc-ref outputs "out"))
"/etc/bash_completion.d"))) (bashcomp (string-append out
(mkdir-p bashcomp) "/etc/bash_completion.d")))
(copy-file "btrfs-completion" (mkdir-p bashcomp)
(string-append bashcomp "/btrfs"))))) (copy-file "btrfs-completion"
(add-after 'install 'install-static (string-append bashcomp "/btrfs")))))
(let ((staticbin (string-append (assoc-ref %outputs (add-after 'install 'install-static
"static") (let ((staticbin (string-append (assoc-ref %outputs
"/bin"))) "static")
(lambda _ "/bin")))
(invoke "make" (lambda _
(string-append "bindir=" staticbin) (invoke "make"
"install-static"))))) (string-append "bindir=" staticbin)
"install-static")))))
#:tests? #f ;XXX: require the 'btrfs' kernel module. #:tests? #f ;XXX: require the 'btrfs' kernel module.
#:test-target "test" #:test-target "test"
#:parallel-tests? #f)) ;tests fail when run in parallel #:parallel-tests? #f)) ;tests fail when run in parallel
(inputs `(("e2fsprogs" ,e2fsprogs) (inputs (list e2fsprogs ;for btrfs-convert
;for btrfs-convert eudev
("eudev" ,eudev) lzo
("lzo" ,lzo) `(,util-linux "lib") ;for libblkid and libuuid
("util-linux:lib" ,util-linux "lib") ;for libblkid and libuuid `(,util-linux "static") ;ditto
("util-linux:static" ,util-linux "static") ;ditto zlib
("zlib" ,zlib) `(,zlib "static")
("zlib:static" ,zlib "static") `(,zstd "lib")
("zstd" ,zstd "lib") `(,zstd "static")))
("zstd:static" ,zstd "static"))) (native-inputs (list pkg-config
(native-inputs `(("pkg-config" ,pkg-config) python-sphinx ;for building documentation
;; For building documentation. acl ;for tests
("python-sphinx" ,python-sphinx) lvm2 ;for dmsetup
;; For tests. grep ;need Perl regexp support
("acl" ,acl) libaio
("dmsetup" ,lvm2) liburing
("grep" ,grep) ;need Perl regexp support util-linux ;for fallocate
("libaio" ,libaio) which))
("liburing" ,liburing)
("util-linux" ,util-linux) ;for fallocate
("which" ,which)))
(home-page "https://btrfs.wiki.kernel.org/index.php/Main_Page") (home-page "https://btrfs.wiki.kernel.org/index.php/Main_Page")
(synopsis "Create and manage btrfs copy-on-write file systems") (synopsis "Create and manage btrfs copy-on-write file systems")
(description (description