Subject: [bug#28853] [PATCH 7/8] gnu: virt-manager: Fix default URI check.

From: Andy Patterson <[email-masked]>
Date: Sun, 15 Oct 2017 16:03:27 -0400

Allows virt-manager to connect to qemu://system by default.

* gnu/packages/virtualization.scm (virt-manager)[arguments]<#:phases>: Add
'fix-default-uri.
---
 gnu/packages/virtualization.scm | 7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/gnu/packages/virtualization.scm b/gnu/packages/virtualization.scm
index f2494f74f..bdf9c8274 100644
--- a/gnu/packages/virtualization.scm
+++ b/gnu/packages/virtualization.scm
@@ -520,6 +520,13 @@ virtualization library.")
              (substitute* "virtcli/cliconfig.py"
                (("/usr") (assoc-ref outputs "out")))
              #t))
+         (add-after 'unpack 'fix-default-uri
+           (lambda* (#:key inputs #:allow-other-keys)
+             ;; xen is not available for now - so only patch qemu
+             (substitute* "virtManager/connect.py"
+               (("/usr(/bin/qemu-system)" _ suffix)
+                (string-append (assoc-ref inputs "qemu") suffix)))
+             #t))
          (add-before 'wrap 'wrap-with-GI_TYPELIB_PATH
            (lambda* (#:key inputs outputs #:allow-other-keys)
              (let* ((bin       (string-append (assoc-ref outputs "out") "/bin"))
-- 
2.14.2