From bbc08c7940a364fb1084defbb8f6f4d51673fb40 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ludovic=20Court=C3=A8s?= Date: Wed, 21 Aug 2013 00:38:11 +0200 Subject: [PATCH] gnu: qemu: Install the Info manuals. * gnu/packages/qemu.scm (qemu): Add `install-info' phase. Add Texinfo as an input. --- gnu/packages/qemu.scm | 21 +++++++++++++++++++-- 1 file changed, 19 insertions(+), 2 deletions(-) diff --git a/gnu/packages/qemu.scm b/gnu/packages/qemu.scm index 60cbc8fcfb..9c9355c4d6 100644 --- a/gnu/packages/qemu.scm +++ b/gnu/packages/qemu.scm @@ -24,6 +24,7 @@ #:use-module (guix build-system gnu) #:use-module (gnu packages) #:use-module (gnu packages autotools) + #:use-module (gnu packages texinfo) #:use-module (gnu packages pkg-config) #:use-module (gnu packages glib) #:use-module (gnu packages python) @@ -72,7 +73,22 @@ (string-append "--prefix=" out) (string-append "--smbd=" samba "/sbin/smbd"))))) - %standard-phases))) + (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))))) + %standard-phases)))) (inputs ; TODO: Add optional inputs. `(;; ("mesa" ,mesa) @@ -92,7 +108,8 @@ ("zlib" ,zlib) ("attr" ,attr) ("samba" ,samba))) ; an optional dependency - (native-inputs `(("perl" ,perl))) + (native-inputs `(("texinfo" ,texinfo) + ("perl" ,perl))) (home-page "http://www.qemu-project.org") (synopsis "Machine emulator and virtualizer")