Advertisement
Guest User

Untitled

a guest
Mar 20th, 2018
170
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. (define-module (gnu packages libvirt-custom)
  2.   #:use-module (gnu packages)
  3.   #:use-module (gnu packages admin)
  4.   #:use-module (gnu packages attr)
  5.   #:use-module (gnu packages autotools)
  6.   #:use-module (gnu packages check)
  7.   #:use-module (gnu packages compression)
  8.   #:use-module (gnu packages curl)
  9.   #:use-module (gnu packages cyrus-sasl)
  10.   #:use-module (gnu packages disk)
  11.   #:use-module (gnu packages dns)
  12.   #:use-module (gnu packages docbook)
  13.   #:use-module (gnu packages documentation)
  14.   #:use-module (gnu packages fontutils)
  15.   #:use-module (gnu packages gl)
  16.   #:use-module (gnu packages glib)
  17.   #:use-module (gnu packages gnome)
  18.   #:use-module (gnu packages gtk)
  19.   #:use-module (gnu packages image)
  20.   #:use-module (gnu packages libusb)
  21.   #:use-module (gnu packages linux)
  22.   #:use-module (gnu packages ncurses)
  23.   #:use-module (gnu packages networking)
  24.   #:use-module (gnu packages perl)
  25.   #:use-module (gnu packages pkg-config)
  26.   #:use-module (gnu packages polkit)
  27.   #:use-module (gnu packages protobuf)
  28.   #:use-module (gnu packages python)
  29.   #:use-module (gnu packages python-web)
  30.   #:use-module (gnu packages pulseaudio)
  31.   #:use-module (gnu packages selinux)
  32.   #:use-module (gnu packages sdl)
  33.   #:use-module (gnu packages spice)
  34.   #:use-module (gnu packages texinfo)
  35.   #:use-module (gnu packages tls)
  36.   #:use-module (gnu packages web)
  37.   #:use-module (gnu packages xdisorg)
  38.   #:use-module (gnu packages xml)
  39.   #:use-module (guix build-system gnu)
  40.   #:use-module (guix build-system python)
  41.   #:use-module (guix download)
  42.   #:use-module ((guix licenses) #:select (gpl2 gpl2+ gpl3+ lgpl2.1 lgpl2.1+))
  43.   #:use-module (guix packages)
  44.   #:use-module (guix utils)
  45.   #:use-module (srfi srfi-1))
  46.  
  47. (define-public libvirt-custom
  48.   (package
  49.     (name "libvirt-custom")
  50.     (version "4.0.0")
  51.     (source (origin
  52.               (method url-fetch)
  53.               (uri (string-append "https://libvirt.org/sources/libvirt-"
  54.                                   version ".tar.xz"))
  55.               (sha256
  56.                (base32
  57.                 "1j6zzajh4j3zzsaqn5f5mrchm0590xcf6rzkfajvqw3bd4dcms79"))))
  58.     (build-system gnu-build-system)
  59.     (arguments
  60.      `(;; FAIL: virshtest
  61.        ;; FAIL: virfirewalltest
  62.        ;; FAIL: virkmodtest
  63.        ;; FAIL: virnetsockettest
  64.        ;; FAIL: networkxml2firewalltest
  65.        ;; FAIL: nwfilterebiptablestest
  66.        ;; FAIL: nwfilterxml2firewalltest
  67.        ;; Time-out while running commandtest.
  68.        #:tests? #f
  69.        #:configure-flags
  70.        (list "--with-polkit"
  71.              "--sysconfdir=/etc"
  72.              "--localstatedir=/var")
  73.        #:phases
  74.        (modify-phases %standard-phases
  75.          (add-after 'unpack 'fix-tests
  76.            (lambda _
  77.              (substitute* '("tests/commandtest.c"
  78.                             "gnulib/tests/test-posix_spawn1.c"
  79.                             "gnulib/tests/test-posix_spawn2.c")
  80.                (("/bin/sh") (which "sh")))
  81.              #t))
  82.          (replace 'install
  83.            ;; Since the sysconfdir and localstatedir should be /etc and /var
  84.            ;; at runtime, we must prevent writing to them at installation
  85.            ;; time.
  86.            (lambda _
  87.              (invoke "make" "install"
  88.                             "sysconfdir=/tmp/etc"
  89.                             "localstatedir=/tmp/var")))
  90.          (add-after 'install 'wrap-libvirtd
  91.            (lambda* (#:key inputs outputs #:allow-other-keys)
  92.              (let ((out (assoc-ref outputs "out")))
  93.                (wrap-program (string-append out "/sbin/libvirtd")
  94.                  `("PATH" = (,(string-append (assoc-ref inputs "iproute")
  95.                                              "/sbin")
  96.                              ,(string-append (assoc-ref inputs "qemu")
  97.                                              "/bin"))))
  98.                #t))))))
  99.     (inputs
  100.      `(("libxml2" ,libxml2)
  101.        ("gnutls" ,gnutls)
  102.        ("dbus" ,dbus)
  103.        ("qemu" ,qemu)
  104.        ("libpcap" ,libpcap)
  105.        ("libnl" ,libnl)
  106.        ("libuuid" ,util-linux)
  107.        ("lvm2" ,lvm2) ; for libdevmapper
  108.        ("curl" ,curl)
  109.        ("openssl" ,openssl)
  110.        ("cyrus-sasl" ,cyrus-sasl)
  111.        ("libyajl" ,libyajl)
  112.        ("audit" ,audit)
  113.        ("dmidecode" ,dmidecode)
  114.        ("dnsmasq" ,dnsmasq)
  115.        ("ebtables" ,ebtables)
  116.        ("iproute" ,iproute)
  117.        ("iptables" ,iptables)))
  118.     (native-inputs
  119.      `(("xsltproc" ,libxslt)
  120.        ("perl" ,perl)
  121.        ("pkg-config" ,pkg-config)
  122.        ("polkit" ,polkit)
  123.        ("python" ,python-2)))
  124.     (home-page "https://libvirt.org")
  125.     (synopsis "Simple API for virtualization")
  126.     (description "Libvirt is a C toolkit to interact with the virtualization
  127. capabilities of recent versions of Linux.  The library aims at providing long
  128. term stable C API initially for the Xen paravirtualization but should be able
  129. to integrate other virtualization mechanisms if needed.")
  130.     (license lgpl2.1+)))
Advertisement
Advertisement
Advertisement
RAW Paste Data Copied
Advertisement