mirror of
https://git.in.rschanz.org/ryan77627/guix.git
synced 2024-12-24 05:18:07 -05:00
gnu: qemu: Use 'modify-phases'.
* gnu/packages/qemu.scm (qemu)[arguments]: Use 'modify-phases'.
This commit is contained in:
parent
219b45567a
commit
05051e8bb1
1 changed files with 43 additions and 46 deletions
|
@ -69,55 +69,52 @@ (define-public qemu
|
||||||
;; boot_sector_test: assertion failed (signature == SIGNATURE): (0x00000000 == 0x0000dead)
|
;; boot_sector_test: assertion failed (signature == SIGNATURE): (0x00000000 == 0x0000dead)
|
||||||
#:parallel-tests? #f
|
#:parallel-tests? #f
|
||||||
|
|
||||||
#:phases (alist-replace
|
#:phases
|
||||||
'configure
|
(modify-phases %standard-phases
|
||||||
(lambda* (#:key inputs outputs (configure-flags '())
|
(replace 'configure
|
||||||
|
(lambda* (#:key inputs outputs (configure-flags '())
|
||||||
#:allow-other-keys)
|
#:allow-other-keys)
|
||||||
;; The `configure' script doesn't understand some of the
|
;; The `configure' script doesn't understand some of the
|
||||||
;; GNU options. Thus, add a new phase that's compatible.
|
;; GNU options. Thus, add a new phase that's compatible.
|
||||||
(let ((out (assoc-ref outputs "out")))
|
(let ((out (assoc-ref outputs "out")))
|
||||||
(setenv "SHELL" (which "bash"))
|
(setenv "SHELL" (which "bash"))
|
||||||
|
|
||||||
;; While we're at it, patch for tests.
|
;; While we're at it, patch for tests.
|
||||||
(substitute* "tests/libqtest.c"
|
(substitute* "tests/libqtest.c"
|
||||||
(("/bin/sh") (which "sh")))
|
(("/bin/sh") (which "sh")))
|
||||||
|
|
||||||
;; The binaries need to be linked against -lrt.
|
|
||||||
(setenv "LDFLAGS" "-lrt")
|
|
||||||
(zero?
|
|
||||||
(apply system*
|
|
||||||
`("./configure"
|
|
||||||
,(string-append "--cc=" (which "gcc"))
|
|
||||||
"--disable-debug-info" ; save build space
|
|
||||||
"--enable-virtfs" ; just to be sure
|
|
||||||
,(string-append "--prefix=" out)
|
|
||||||
,@configure-flags)))))
|
|
||||||
(alist-cons-after
|
|
||||||
'install 'install-info
|
|
||||||
(lambda* (#:key inputs outputs #:allow-other-keys)
|
|
||||||
;; Install the Info manual, unless Texinfo is missing.
|
|
||||||
(or (not (assoc-ref inputs "texinfo"))
|
|
||||||
(let ((out (assoc-ref outputs "out")))
|
|
||||||
(and (zero? (system* "make" "info"))
|
|
||||||
(let ((infodir (string-append out "/share/info")))
|
|
||||||
(mkdir-p infodir)
|
|
||||||
(for-each (lambda (info)
|
|
||||||
(copy-file
|
|
||||||
info
|
|
||||||
(string-append infodir "/" info)))
|
|
||||||
(find-files "." "\\.info$"))
|
|
||||||
#t)))))
|
|
||||||
(alist-cons-before
|
|
||||||
'check 'disable-test-qga
|
|
||||||
(lambda _
|
|
||||||
(substitute* "tests/Makefile"
|
|
||||||
;; Comment out the test-qga test, which needs /sys and
|
|
||||||
;; fails within the build environment.
|
|
||||||
(("check-unit-.* tests/test-qga" all)
|
|
||||||
(string-append "# " all)))
|
|
||||||
#t)
|
|
||||||
%standard-phases)))))
|
|
||||||
|
|
||||||
|
;; The binaries need to be linked against -lrt.
|
||||||
|
(setenv "LDFLAGS" "-lrt")
|
||||||
|
(zero?
|
||||||
|
(apply system*
|
||||||
|
`("./configure"
|
||||||
|
,(string-append "--cc=" (which "gcc"))
|
||||||
|
"--disable-debug-info" ; save build space
|
||||||
|
"--enable-virtfs" ; just to be sure
|
||||||
|
,(string-append "--prefix=" out)
|
||||||
|
,@configure-flags))))))
|
||||||
|
(add-after 'install 'install-info
|
||||||
|
(lambda* (#:key inputs outputs #:allow-other-keys)
|
||||||
|
;; Install the Info manual, unless Texinfo is missing.
|
||||||
|
(or (not (assoc-ref inputs "texinfo"))
|
||||||
|
(let ((out (assoc-ref outputs "out")))
|
||||||
|
(and (zero? (system* "make" "info"))
|
||||||
|
(let ((infodir (string-append out "/share/info")))
|
||||||
|
(mkdir-p infodir)
|
||||||
|
(for-each (lambda (info)
|
||||||
|
(copy-file
|
||||||
|
info
|
||||||
|
(string-append infodir "/" info)))
|
||||||
|
(find-files "." "\\.info$"))
|
||||||
|
#t))))))
|
||||||
|
(add-before 'check 'disable-test-qga
|
||||||
|
(lambda _
|
||||||
|
(substitute* "tests/Makefile"
|
||||||
|
;; Comment out the test-qga test, which needs /sys and
|
||||||
|
;; fails within the build environment.
|
||||||
|
(("check-unit-.* tests/test-qga" all)
|
||||||
|
(string-append "# " all)))
|
||||||
|
#t)))))
|
||||||
(inputs ; TODO: Add optional inputs.
|
(inputs ; TODO: Add optional inputs.
|
||||||
`(("sdl" ,sdl)
|
`(("sdl" ,sdl)
|
||||||
("mesa" ,mesa)
|
("mesa" ,mesa)
|
||||||
|
|
Loading…
Reference in a new issue