all messages for Guix-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Ricardo Wurmus <rekado@elephly.net>
To: guix-devel@gnu.org
Subject: [PATCH 5/5] gnu: Add virt-manager.
Date: Wed,  3 Aug 2016 17:46:03 +0200	[thread overview]
Message-ID: <20160803154603.6939-6-rekado@elephly.net> (raw)
In-Reply-To: <20160803154603.6939-1-rekado@elephly.net>

* gnu/packages/qemu.scm (virt-manager): New variable.
---
 gnu/packages/qemu.scm | 77 ++++++++++++++++++++++++++++++++++++++++++++++++++-
 1 file changed, 76 insertions(+), 1 deletion(-)

diff --git a/gnu/packages/qemu.scm b/gnu/packages/qemu.scm
index 6c36815..04aa18f 100644
--- a/gnu/packages/qemu.scm
+++ b/gnu/packages/qemu.scm
@@ -50,7 +50,7 @@
   #:use-module (guix build-system gnu)
   #:use-module (guix build-system python)
   #:use-module (guix download)
-  #:use-module ((guix licenses) #:select (gpl2 lgpl2.1+))
+  #:use-module ((guix licenses) #:select (gpl2 gpl2+ lgpl2.1+))
   #:use-module (guix packages)
   #:use-module (guix utils)
   #:use-module (srfi srfi-1))
@@ -402,3 +402,78 @@ virtualization library.")
 
 (define-public python2-libvirt
   (package-with-python2 python-libvirt))
+
+(define-public virt-manager
+  (package
+    (name "virt-manager")
+    (version "1.4.0")
+    (source (origin
+              (method url-fetch)
+              (uri (string-append "https://virt-manager.org/download/sources"
+                                  "/virt-manager/virt-manager-"
+                                  version ".tar.gz"))
+              (sha256
+               (base32
+                "1jnawqjmcqd2db78ngx05x7cxxn3iy1sb4qfgbwcn045qh6a8cdz"))))
+    (build-system python-build-system)
+    (arguments
+     `(#:python ,python-2
+       ;; Some of the tests seem to require network access to install virtual
+       ;; machines.
+       #:tests? #f
+       #:modules ((ice-9 match)
+                  (srfi srfi-26)
+                  (guix build python-build-system)
+                  (guix build utils))
+       #:phases
+       (modify-phases %standard-phases
+         (add-after 'unpack 'fix-setup
+           (lambda* (#:key outputs #:allow-other-keys)
+             (substitute* "virtcli/cliconfig.py"
+               (("/usr") (assoc-ref outputs "out")))
+             #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"))
+                    (bin-files (find-files bin ".*"))
+                    (paths     (map (match-lambda
+                                      ((output . directory)
+                                       (let* ((girepodir (string-append
+                                                          directory
+                                                          "/lib/girepository-1.0")))
+                                         (if (file-exists? girepodir)
+                                             girepodir #f))))
+                                    inputs)))
+               (for-each (lambda (file)
+                           (format #t "wrapping ~a\n" file)
+                           (wrap-program file
+                             `("GI_TYPELIB_PATH" ":" prefix
+                               ,(filter identity paths))))
+                         bin-files))
+             #t)))))
+    (inputs
+     `(("gtk+" ,gtk+)
+       ("libvirt" ,libvirt)
+       ("libvirt-glib" ,libvirt-glib)
+       ("libosinfo" ,libosinfo)
+       ("gobject-introspection" ,gobject-introspection)
+       ("python2-libvirt" ,python2-libvirt)
+       ("python2-requests" ,python2-requests)
+       ("python2-ipaddr" ,python2-ipaddr)
+       ("python2-pygobject" ,python2-pygobject)
+       ("python2-libxml2" ,python2-libxml2)))
+    ;; virt-manager searches for qemu-img or kvm-img in the PATH.
+    (propagated-inputs
+     `(("qemu" ,qemu)))
+    (native-inputs
+     `(("glib" ,glib "bin")             ; glib-compile-schemas.
+       ("perl" ,perl)                   ; pod2man
+       ("intltool" ,intltool)))         ; intltool
+    (home-page "https://virt-manager.org/")
+    (synopsis "Manage virtual machines with virt-manager")
+    (description
+     "The virt-manager application is a desktop user interface for managing
+virtual machines through libvirt.  It primarily targets KVM VMs, but also
+manages Xen and LXC (linux containers).  It presents a summary view of running
+domains, their live performance & resource utilization statistics.")
+    (license gpl2+)))
-- 
2.9.0

      parent reply	other threads:[~2016-08-03 15:46 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-08-03 15:45 [PATCH 0/5] Add virt-manager Ricardo Wurmus
2016-08-03 15:45 ` [PATCH 1/5] gnu: Add libvirt Ricardo Wurmus
2016-08-07  2:26   ` Leo Famulari
2016-08-10 14:13     ` Ricardo Wurmus
2016-08-03 15:46 ` [PATCH 2/5] gnu: Add libosinfo Ricardo Wurmus
2016-08-07  2:30   ` Leo Famulari
2016-08-11 16:41     ` Ricardo Wurmus
2016-08-12 18:17     ` Ricardo Wurmus
2016-08-03 15:46 ` [PATCH 3/5] gnu: Add libvirt-glib Ricardo Wurmus
2016-08-03 15:46 ` [PATCH 4/5] gnu: Add python-libvirt Ricardo Wurmus
2016-08-03 15:46 ` Ricardo Wurmus [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20160803154603.6939-6-rekado@elephly.net \
    --to=rekado@elephly.net \
    --cc=guix-devel@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/guix.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.