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 1/5] gnu: Add libvirt.
Date: Wed,  3 Aug 2016 17:45:59 +0200	[thread overview]
Message-ID: <20160803154603.6939-2-rekado@elephly.net> (raw)
In-Reply-To: <20160803154603.6939-1-rekado@elephly.net>

* gnu/packages/qemu.scm (libvirt): New variable.
---
 gnu/packages/qemu.scm | 84 +++++++++++++++++++++++++++++++++++++++++++++++++--
 1 file changed, 82 insertions(+), 2 deletions(-)

diff --git a/gnu/packages/qemu.scm b/gnu/packages/qemu.scm
index 911ed4c..a12a3f6 100644
--- a/gnu/packages/qemu.scm
+++ b/gnu/packages/qemu.scm
@@ -2,6 +2,7 @@
 ;;; Copyright © 2013, 2014, 2015, 2016 Ludovic Courtès <ludo@gnu.org>
 ;;; Copyright © 2015, 2016 Mark H Weaver <mhw@netris.org>
 ;;; Copyright © 2016 Efraim Flashner <efraim@flashner.co.il>
+;;; Copyright © 2016 Ricardo Wurmus <rekado@elephly.net>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -20,9 +21,13 @@
 
 (define-module (gnu packages qemu)
   #:use-module (gnu packages)
-  #:use-module (gnu packages autotools)
+  #:use-module (gnu packages admin)
   #:use-module (gnu packages attr)
+  #:use-module (gnu packages autotools)
   #:use-module (gnu packages compression)
+  #:use-module (gnu packages curl)
+  #:use-module (gnu packages cyrus-sasl)
+  #:use-module (gnu packages disk)
   #:use-module (gnu packages gl)
   #:use-module (gnu packages glib)
   #:use-module (gnu packages image)
@@ -31,13 +36,17 @@
   #:use-module (gnu packages ncurses)
   #:use-module (gnu packages perl)
   #:use-module (gnu packages pkg-config)
+  #:use-module (gnu packages polkit)
   #:use-module (gnu packages python)
   #:use-module (gnu packages sdl)
   #:use-module (gnu packages texinfo)
+  #:use-module (gnu packages tls)
+  #:use-module (gnu packages web)
   #:use-module (gnu packages xdisorg)
+  #:use-module (gnu packages xml)
   #:use-module (guix build-system gnu)
   #:use-module (guix download)
-  #:use-module ((guix licenses) #:select (gpl2))
+  #:use-module ((guix licenses) #:select (gpl2 lgpl2.1+))
   #:use-module (guix packages)
   #:use-module (guix utils)
   #:use-module (srfi srfi-1))
@@ -176,3 +185,74 @@ server and embedded PowerPC, and S390 guests.")
     ;; Remove dependencies on optional libraries, notably GUI libraries.
     (inputs (fold alist-delete (package-inputs qemu)
                   '("sdl" "mesa" "libusb")))))
+
+(define-public libvirt
+  (package
+    (name "libvirt")
+    (version "2.1.0")
+    (source (origin
+              (method url-fetch)
+              (uri (string-append "http://libvirt.org/sources/libvirt-"
+                                  version ".tar.xz"))
+              (sha256
+               (base32
+                "0sriasjc573c519yqw1hcfb3qqjcsm9hm8vayw0anwkl6di9ay8s"))))
+    (build-system gnu-build-system)
+    (arguments
+     `(;; FAIL: virshtest
+       ;; FAIL: virfirewalltest
+       ;; FAIL: virkmodtest
+       ;; FAIL: virnetsockettest
+       ;; FAIL: networkxml2firewalltest
+       ;; FAIL: nwfilterebiptablestest
+       ;; FAIL: nwfilterxml2firewalltest
+       ;; Times out after PASS: virsh-vcpupin
+       #:tests? #f
+       #:configure-flags
+       (list "--with-polkit"
+             "--localstatedir=/var")
+       #:phases
+       (modify-phases %standard-phases
+         (add-after 'unpack 'fix-tests
+           (lambda _
+             (substitute* '("tests/commandtest.c"
+                            "gnulib/tests/test-posix_spawn1.c"
+                            "gnulib/tests/test-posix_spawn2.c")
+               (("/bin/sh") (which "bash")))
+             #t))
+         (add-after 'unpack 'do-not-mkdir-in-/var
+           ;; Since the localstatedir should be /var at runtime, we must
+           ;; prevent writing to /var at installation time.
+           (lambda* (#:key outputs #:allow-other-keys)
+             (let* ((out           (assoc-ref outputs "out"))
+                    (localstatedir (string-append out "/var")))
+               (substitute* '("src/Makefile.in"
+                              "daemon/Makefile.in")
+                 (("\\$\\(DESTDIR\\)\\$\\(localstatedir)") localstatedir)))
+             #t)))))
+    (inputs
+     `(("libxml2" ,libxml2)
+       ("gnutls" ,gnutls)
+       ("dbus" ,dbus)
+       ("qemu" ,qemu)
+       ("polkit" ,polkit)
+       ("libpcap" ,libpcap)
+       ("libnl" ,libnl)
+       ("libuuid" ,util-linux)
+       ("lvm2" ,lvm2) ; for libdevmapper
+       ("curl" ,curl)
+       ("openssl" ,openssl)
+       ("cyrus-sasl" ,cyrus-sasl)
+       ("perl" ,perl)
+       ("python" ,python-2)
+       ("libyajl" ,libyajl)
+       ("audit" ,audit)))
+    (native-inputs
+     `(("pkg-config" ,pkg-config)))
+    (home-page "http://libvirt.org")
+    (synopsis "Simple API for virtualization")
+    (description "Libvirt is a C toolkit to interact with the virtualization
+capabilities of recent versions of Linux.  The library aims at providing long
+term stable C API initially for the Xen paravirtualization but should be able
+to integrate other virtualization mechanisms if needed.")
+    (license lgpl2.1+)))
-- 
2.9.0

  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 ` Ricardo Wurmus [this message]
2016-08-07  2:26   ` [PATCH 1/5] gnu: Add libvirt 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 ` [PATCH 5/5] gnu: Add virt-manager Ricardo Wurmus

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-2-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.