Archived
1
0
Fork 0

gnu: util-linux: Use G-expressions.

* gnu/packages/linux.scm (util-linux)[arguments]: Convert to gexps.
This commit is contained in:
Marius Bakke 2022-06-26 16:35:42 +02:00
parent 879c71edf4
commit 82dae0c9e3
No known key found for this signature in database
GPG key ID: A2A06DF2A33A54FA

View file

@ -1844,7 +1844,8 @@ providing the system administrator with some help in common tasks.")
"lib" ;8.8 MiB shared libraries, headers and locales "lib" ;8.8 MiB shared libraries, headers and locales
"static")) ;2.9 MiB static .a libraries "static")) ;2.9 MiB static .a libraries
(arguments (arguments
`(#:configure-flags (list "--disable-use-tty-group" (list #:configure-flags
#~(list "--disable-use-tty-group"
(string-append (string-append
"--enable-fs-paths-default=" "--enable-fs-paths-default="
"/run/setuid-programs" "/run/setuid-programs"
@ -1852,23 +1853,22 @@ providing the system administrator with some help in common tasks.")
;; Don't try to chown root:root mount and umount ;; Don't try to chown root:root mount and umount
"--disable-makeinstall-chown" "--disable-makeinstall-chown"
"--localstatedir=/var" "--localstatedir=/var"
(string-append "--localedir=" (string-append "--localedir=" #$output:lib
(assoc-ref %outputs "lib")
"/share/locale") "/share/locale")
;; Install completions where our ;; Install completions where our bash-completion package
;; bash-completion package expects them. ;; expects them.
(string-append "--with-bashcompletiondir=" (string-append "--with-bashcompletiondir=" #$output
(assoc-ref %outputs "out")
"/etc/bash_completion.d")) "/etc/bash_completion.d"))
;; FIXME: For now we cannot reliably run tests on GNU/Hurd: ;; FIXME: For now we cannot reliably run tests on GNU/Hurd:
;; <https://bugs.gnu.org/47791>. ;; <https://bugs.gnu.org/47791>.
#:tests? ,(and (not (%current-target-system)) #:tests? (and (not (%current-target-system))
(not (string-suffix? "-gnu" (%current-system)))) (not (string-suffix? "-gnu" (%current-system))))
#:phases (modify-phases %standard-phases #:phases
#~(modify-phases %standard-phases
(add-before 'configure 'patch-build-scripts (add-before 'configure 'patch-build-scripts
(lambda* (#:key outputs #:allow-other-keys) (lambda _
(substitute* "configure" (substitute* "configure"
;; The build system assumes that we want to install ;; The build system assumes that we want to install
;; libraries below $exec_prefix when $libdir does not ;; libraries below $exec_prefix when $libdir does not
@ -1876,12 +1876,11 @@ providing the system administrator with some help in common tasks.")
(("usrlib_execdir='\\$\\{exec_prefix\\}'\\$libdir") (("usrlib_execdir='\\$\\{exec_prefix\\}'\\$libdir")
"usrlib_execdir=$libdir")))) "usrlib_execdir=$libdir"))))
(add-before 'build 'set-umount-file-name (add-before 'build 'set-umount-file-name
(lambda* (#:key outputs #:allow-other-keys) (lambda _
;; Tell 'eject' the right file name of 'umount'. ;; Tell 'eject' the right file name of 'umount'.
(let ((out (assoc-ref outputs "out")))
(substitute* "sys-utils/eject.c" (substitute* "sys-utils/eject.c"
(("\"/bin/umount\"") (("\"/bin/umount\"")
(string-append "\"" out "/bin/umount\"")))))) (string-append "\"" #$output "/bin/umount\"")))))
(add-before 'check 'pre-check (add-before 'check 'pre-check
(lambda* (#:key native-inputs inputs #:allow-other-keys) (lambda* (#:key native-inputs inputs #:allow-other-keys)
(let ((services (search-input-file (or native-inputs inputs) (let ((services (search-input-file (or native-inputs inputs)
@ -1914,9 +1913,9 @@ providing the system administrator with some help in common tasks.")
;; same machine. See <https://issues.guix.gnu.org/49933>. ;; same machine. See <https://issues.guix.gnu.org/49933>.
(delete-file "tests/ts/lsns/ioctl_ns"))) (delete-file "tests/ts/lsns/ioctl_ns")))
(add-after 'install 'move-static-libraries (add-after 'install 'move-static-libraries
(lambda* (#:key outputs #:allow-other-keys) (lambda _
(let ((lib (assoc-ref outputs "lib")) (let ((lib #$output:lib)
(static (assoc-ref outputs "static"))) (static #$output:static))
;; Move static libraries to the "static" output. ;; Move static libraries to the "static" output.
(mkdir-p (string-append static "/lib")) (mkdir-p (string-append static "/lib"))
@ -1933,13 +1932,13 @@ providing the system administrator with some help in common tasks.")
(substitute* (find-files "lib" "\\.la$") (substitute* (find-files "lib" "\\.la$")
(("old_library=.*") "old_library=''\n")))))) (("old_library=.*") "old_library=''\n"))))))
(add-after 'install 'adjust-pkg-config-files (add-after 'install 'adjust-pkg-config-files
(lambda* (#:key outputs #:allow-other-keys) (lambda _
(let ((lib (assoc-ref outputs "lib")))
;; Drop the unused "prefix=" and "exec_prefix=" variables from ;; Drop the unused "prefix=" and "exec_prefix=" variables from
;; the pkg-config files to avoid a cyclic reference on "out". ;; the pkg-config files to avoid a cyclic reference on "out".
(substitute* (find-files (string-append lib "/lib/pkgconfig") (substitute* (find-files (string-append #$output:lib
"/lib/pkgconfig")
"\\.pc$") "\\.pc$")
(("^(exec_)?prefix=.*") "")))))))) (("^(exec_)?prefix=.*") "")))))))
(inputs (inputs
(list file ;for libmagic (list file ;for libmagic
ncurses ncurses