From 2f1626d4526fee5e7a2836d811c96cc2c823ce71 Mon Sep 17 00:00:00 2001 From: Rutger Helling Date: Wed, 25 Apr 2018 08:13:44 +0200 Subject: [PATCH 1/2] gnu: qemu: Build with Python 3 and SDL 2. * gnu/packages/virtualization.scm (qemu)[arguments]: Add configure-flag to build with Python 3. [inputs]: Use sdl2 instead of sdl. [native-inputs]: Use python instead of address@hidden * gnu/packages/virtualization.scm (qemu-minimal)[native-inputs]: Remove python from inherited packages and use address@hidden instead. [inputs]: Remove sdl2 instead of sdl from inherited packages. --- gnu/packages/virtualization.scm | 17 +++++++++++++---- 1 file changed, 13 insertions(+), 4 deletions(-) diff --git a/gnu/packages/virtualization.scm b/gnu/packages/virtualization.scm index 86f4d7136..46b136e31 100644 --- a/gnu/packages/virtualization.scm +++ b/gnu/packages/virtualization.scm @@ -5,7 +5,7 @@ ;;; Copyright © 2016, 2017 Ricardo Wurmus ;;; Copyright © 2017 Alex Vong ;;; Copyright © 2017 Andy Patterson -;;; Copyright © 2017 Rutger Helling +;;; Copyright © 2017, 2018 Rutger Helling ;;; Copyright © 2017, 2018 Tobias Geerinckx-Rice ;;; Copyright © 2018 Danny Milosavljevic ;;; Copyright © 2018 Sou Bunnbu @@ -101,6 +101,11 @@ ;; boot_sector_test: assertion failed (signature == SIGNATURE): (0x00000000 == 0x0000dead) #:parallel-tests? #f #:configure-flags (list "--enable-usb-redir" "--enable-opengl" + ;; Remove below once Python 3 becomes the default + ;; 'python' binary. + (string-append "--python=" + (assoc-ref %build-inputs "python") + "/bin/python3") (string-append "--smbd=" (assoc-ref %outputs "out") "/libexec/samba-wrapper") @@ -187,7 +192,7 @@ exec smbd $@"))) ;; ("pciutils" ,pciutils) ("pixman" ,pixman) ("pulseaudio" ,pulseaudio) - ("sdl" ,sdl) + ("sdl2" ,sdl2) ("spice" ,spice) ("usbredir" ,usbredir) ("util-linux" ,util-linux) @@ -197,7 +202,7 @@ exec smbd $@"))) (native-inputs `(("glib:bin" ,glib "bin") ; gtester, etc. ("perl" ,perl) ("pkg-config" ,pkg-config) - ("python" ,python-2) ; incompatible with Python 3 according to error message + ("python" ,python) ("texinfo" ,texinfo))) (home-page "https://www.qemu.org") (synopsis "Machine emulator and virtualizer") @@ -231,9 +236,13 @@ server and embedded PowerPC, and S390 guests.") ;; Restrict to the targets supported by Guix. ''("--target-list=i386-softmmu,x86_64-softmmu,mips64el-softmmu,arm-softmmu,aarch64-softmmu")))) + ;; qemu-minimal-2.10 needs Python 2. Remove below once no longer necessary. + (native-inputs `(("python-2" ,python-2) + ,@(fold alist-delete (package-native-inputs qemu) + '("python")))) ;; Remove dependencies on optional libraries, notably GUI libraries. (inputs (fold alist-delete (package-inputs qemu) - '("libusb" "mesa" "sdl" "spice" "virglrenderer" + '("libusb" "mesa" "sdl2" "spice" "virglrenderer" "usbredir" "libdrm" "libepoxy" "pulseaudio"))))) (define-public libosinfo -- 2.17.0