me
/
guix
Archived
1
0
Fork 0

gnu: util-linux: Use G-expressions.

* gnu/packages/linux.scm (util-linux)[arguments]: Convert to gexps.
master
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
1 changed files with 90 additions and 91 deletions

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
"static")) ;2.9 MiB static .a libraries
(arguments
`(#:configure-flags (list "--disable-use-tty-group"
(list #:configure-flags
#~(list "--disable-use-tty-group"
(string-append
"--enable-fs-paths-default="
"/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
"--disable-makeinstall-chown"
"--localstatedir=/var"
(string-append "--localedir="
(assoc-ref %outputs "lib")
(string-append "--localedir=" #$output:lib
"/share/locale")
;; Install completions where our
;; bash-completion package expects them.
(string-append "--with-bashcompletiondir="
(assoc-ref %outputs "out")
;; Install completions where our bash-completion package
;; expects them.
(string-append "--with-bashcompletiondir=" #$output
"/etc/bash_completion.d"))
;; FIXME: For now we cannot reliably run tests on GNU/Hurd:
;; <https://bugs.gnu.org/47791>.
#:tests? ,(and (not (%current-target-system))
#:tests? (and (not (%current-target-system))
(not (string-suffix? "-gnu" (%current-system))))
#:phases (modify-phases %standard-phases
#:phases
#~(modify-phases %standard-phases
(add-before 'configure 'patch-build-scripts
(lambda* (#:key outputs #:allow-other-keys)
(lambda _
(substitute* "configure"
;; The build system assumes that we want to install
;; 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=$libdir"))))
(add-before 'build 'set-umount-file-name
(lambda* (#:key outputs #:allow-other-keys)
(lambda _
;; Tell 'eject' the right file name of 'umount'.
(let ((out (assoc-ref outputs "out")))
(substitute* "sys-utils/eject.c"
(("\"/bin/umount\"")
(string-append "\"" out "/bin/umount\""))))))
(string-append "\"" #$output "/bin/umount\"")))))
(add-before 'check 'pre-check
(lambda* (#:key native-inputs inputs #:allow-other-keys)
(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>.
(delete-file "tests/ts/lsns/ioctl_ns")))
(add-after 'install 'move-static-libraries
(lambda* (#:key outputs #:allow-other-keys)
(let ((lib (assoc-ref outputs "lib"))
(static (assoc-ref outputs "static")))
(lambda _
(let ((lib #$output:lib)
(static #$output:static))
;; Move static libraries to the "static" output.
(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$")
(("old_library=.*") "old_library=''\n"))))))
(add-after 'install 'adjust-pkg-config-files
(lambda* (#:key outputs #:allow-other-keys)
(let ((lib (assoc-ref outputs "lib")))
(lambda _
;; Drop the unused "prefix=" and "exec_prefix=" variables from
;; 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$")
(("^(exec_)?prefix=.*") ""))))))))
(("^(exec_)?prefix=.*") "")))))))
(inputs
(list file ;for libmagic
ncurses