gnu: xorg: Disable not compiling xf86-video-geode.
[jackhill/guix/guix.git] / gnu / packages / qemu.scm
index e6859aa..b10935c 100644 (file)
@@ -22,6 +22,7 @@
   #:use-module (guix utils)
   #:use-module ((guix licenses) #:select (gpl2))
   #:use-module (guix build-system gnu)
+  #:use-module (gnu packages)
   #:use-module (gnu packages autotools)
   #:use-module (gnu packages pkg-config)
   #:use-module (gnu packages glib)
@@ -32,6 +33,7 @@
   #:use-module (gnu packages libjpeg)
   #:use-module (gnu packages attr)
   #:use-module (gnu packages linux)
+  #:use-module (gnu packages samba)
   #:use-module (gnu packages perl))
 
 (define-public qemu-kvm
                  (lambda* (#:key inputs outputs #:allow-other-keys)
                    ;; The `configure' script doesn't understand some of the
                    ;; GNU options.  Thus, add a new phase that's compatible.
-                   (let ((out (assoc-ref outputs "out")))
+                   (let ((out   (assoc-ref outputs "out"))
+                         (samba (assoc-ref inputs "samba")))
                      (setenv "SHELL" (which "bash"))
 
                      ;; The binaries need to be linked against -lrt.
                      (setenv "LDFLAGS" "-lrt")
                      (zero?
                       (system* "./configure"
-                               (string-append "--prefix=" out)))))
+                               (string-append "--prefix=" out)
+                               (string-append "--smbd=" samba
+                                              "/sbin/smbd")))))
                  %standard-phases)))
     (inputs                                       ; TODO: Add optional inputs.
      `(;; ("mesa" ,mesa)
@@ -76,7 +81,8 @@
        ;; ("alsa-lib" ,alsa-lib)
        ;; ("SDL" ,SDL)
        ("zlib" ,zlib)
-       ("attr" ,attr)))
+       ("attr" ,attr)
+       ("samba" ,samba)))                         ; an optional dependency
     (home-page "http://www.linux-kvm.org/")
     (synopsis
      "Virtualization for Linux on x86 hardware containing virtualization extensions")
@@ -91,6 +97,18 @@ underway to get the required changes upstream.")
     ;; Many files are GPLv2+, but some are GPLv2-only---e.g., `memory.c'.
     (license gpl2)))
 
+(define-public qemu-kvm/smb-shares
+  ;; A patched QEMU-KVM where `-net smb' yields two shares instead of one: one
+  ;; for the store, and another one for exchanges with the host.
+  (package (inherit qemu-kvm)
+    (name "qemu-kvm-with-multiple-smb-shares")
+    (inputs `(,@(package-inputs qemu-kvm)
+              ("patch/smb-shares"
+               ,(search-patch "qemu-multiple-smb-shares.patch"))))
+    (arguments
+     `(#:patches (list (assoc-ref %build-inputs "patch/smb-shares"))
+       ,@(package-arguments qemu-kvm)))))
+
 (define-public qemu
   ;; The real one, with a complete target list.
   (package (inherit qemu-kvm)