mirror of
https://git.in.rschanz.org/ryan77627/guix.git
synced 2025-01-01 00:52:55 -05:00
gnu: util-linux: Use G-expressions.
* gnu/packages/linux.scm (util-linux)[arguments]: Convert to gexps.
This commit is contained in:
parent
879c71edf4
commit
82dae0c9e3
1 changed files with 90 additions and 91 deletions
|
@ -1844,7 +1844,8 @@ (define-public util-linux
|
|||
"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 @@ (define-public util-linux
|
|||
;; 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 @@ (define-public util-linux
|
|||
(("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 @@ (define-public util-linux
|
|||
;; 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 @@ (define-public util-linux
|
|||
(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
|
||||
|
|
Loading…
Reference in a new issue