1 ;;; GNU Guix --- Functional package management for GNU
2 ;;; Copyright © 2013, 2014, 2015, 2016, 2017, 2020 Ludovic Courtès <ludo@gnu.org>
3 ;;; Copyright © 2015, 2016, 2017, 2018 Mark H Weaver <mhw@netris.org>
4 ;;; Copyright © 2016, 2017, 2018. 2019 Efraim Flashner <efraim@flashner.co.il>
5 ;;; Copyright © 2016, 2017 Ricardo Wurmus <rekado@elephly.net>
6 ;;; Copyright © 2017 Alex Vong <alexvong1995@gmail.com>
7 ;;; Copyright © 2017 Andy Patterson <ajpatter@uwaterloo.ca>
8 ;;; Copyright © 2017, 2018, 2019 Rutger Helling <rhelling@mykolab.com>
9 ;;; Copyright © 2017, 2018, 2019, 2020 Tobias Geerinckx-Rice <me@tobias.gr>
10 ;;; Copyright © 2018 Danny Milosavljevic <dannym@scratchpost.org>
11 ;;; Copyright © 2018 Sou Bunnbu <iyzsong@member.fsf.org>
12 ;;; Copyright © 2018 Julien Lepiller <julien@lepiller.eu>
13 ;;; Copyright © 2019 Guy Fleury Iteriteka <hoonandon@gmail.com>
14 ;;; Copyright © 2020 Jakub Kądziołka <kuba@kadziolka.net>
15 ;;; Copyright © 2020 Brice Waegeneire <brice@waegenei.re>
16 ;;; Copyright © 2020 Mathieu Othacehe <m.othacehe@gmail.com>
18 ;;; This file is part of GNU Guix.
20 ;;; GNU Guix is free software; you can redistribute it and/or modify it
21 ;;; under the terms of the GNU General Public License as published by
22 ;;; the Free Software Foundation; either version 3 of the License, or (at
23 ;;; your option) any later version.
25 ;;; GNU Guix is distributed in the hope that it will be useful, but
26 ;;; WITHOUT ANY WARRANTY; without even the implied warranty of
27 ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
28 ;;; GNU General Public License for more details.
30 ;;; You should have received a copy of the GNU General Public License
31 ;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
33 (define-module (gnu packages virtualization)
34 #:use-module (gnu packages)
35 #:use-module (gnu packages admin)
36 #:use-module (gnu packages assembly)
37 #:use-module (gnu packages attr)
38 #:use-module (gnu packages autotools)
39 #:use-module (gnu packages backup)
40 #:use-module (gnu packages bison)
41 #:use-module (gnu packages check)
42 #:use-module (gnu packages cmake)
43 #:use-module (gnu packages compression)
44 #:use-module (gnu packages cross-base)
45 #:use-module (gnu packages curl)
46 #:use-module (gnu packages cyrus-sasl)
47 #:use-module (gnu packages disk)
48 #:use-module (gnu packages dns)
49 #:use-module (gnu packages docbook)
50 #:use-module (gnu packages documentation)
51 #:use-module (gnu packages figlet)
52 #:use-module (gnu packages firmware)
53 #:use-module (gnu packages flex)
54 #:use-module (gnu packages fontutils)
55 #:use-module (gnu packages freedesktop)
56 #:use-module (gnu packages gettext)
57 #:use-module (gnu packages gl)
58 #:use-module (gnu packages glib)
59 #:use-module (gnu packages gnome)
60 #:use-module (gnu packages gnupg)
61 #:use-module (gnu packages golang)
62 #:use-module (gnu packages gtk)
63 #:use-module (gnu packages image)
64 #:use-module (gnu packages libbsd)
65 #:use-module (gnu packages libusb)
66 #:use-module (gnu packages linux)
67 #:use-module (gnu packages ncurses)
68 #:use-module (gnu packages nettle)
69 #:use-module (gnu packages networking)
70 #:use-module (gnu packages onc-rpc)
71 #:use-module (gnu packages package-management)
72 #:use-module (gnu packages perl)
73 #:use-module (gnu packages pkg-config)
74 #:use-module (gnu packages polkit)
75 #:use-module (gnu packages protobuf)
76 #:use-module (gnu packages python)
77 #:use-module (gnu packages python-web)
78 #:use-module (gnu packages python-xyz)
79 #:use-module (gnu packages pulseaudio)
80 #:use-module (gnu packages selinux)
81 #:use-module (gnu packages sdl)
82 #:use-module (gnu packages sphinx)
83 #:use-module (gnu packages spice)
84 #:use-module (gnu packages texinfo)
85 #:use-module (gnu packages textutils)
86 #:use-module (gnu packages tls)
87 #:use-module (gnu packages web)
88 #:use-module (gnu packages wget)
89 #:use-module (gnu packages xdisorg)
90 #:use-module (gnu packages xml)
91 #:use-module (gnu packages xorg)
92 #:use-module (guix build-system cmake)
93 #:use-module (guix build-system gnu)
94 #:use-module (guix build-system go)
95 #:use-module (guix build-system meson)
96 #:use-module (guix build-system python)
97 #:use-module (guix build-system trivial)
98 #:use-module (guix download)
99 #:use-module (guix git-download)
100 #:use-module ((guix licenses) #:prefix license:)
101 #:use-module (guix packages)
102 #:use-module (guix utils)
103 #:use-module (srfi srfi-1))
105 (define (qemu-patch commit file-name sha256)
106 "Return an origin for COMMIT."
110 "http://git.qemu.org/?p=qemu.git;a=commitdiff_plain;h="
113 (file-name file-name)))
121 (uri (string-append "https://download.qemu.org/qemu-"
123 (patches (search-patches "qemu-CVE-2020-1711.patch"
124 "qemu-CVE-2020-7039.patch"
125 "qemu-CVE-2020-7211.patch"
126 "qemu-CVE-2020-8608.patch"
127 "qemu-fix-documentation-build-failure.patch"))
130 "1w38hzlw7xp05gcq1nhga7hxvndxy6dfcnzi7q2il8ff110isj6k"))))
131 (build-system gnu-build-system)
133 `(;; Running tests in parallel can occasionally lead to failures, like:
134 ;; boot_sector_test: assertion failed (signature == SIGNATURE): (0x00000000 == 0x0000dead)
137 ;; FIXME: Disable tests on i686 to work around
138 ;; <https://bugs.gnu.org/40527>.
139 #:tests? ,(or (%current-target-system)
140 (not (string=? "i686-linux" (%current-system))))
142 #:configure-flags (list "--enable-usb-redir" "--enable-opengl"
144 (string-append "--smbd="
145 (assoc-ref %outputs "out")
146 "/libexec/samba-wrapper")
147 "--audio-drv-list=alsa,pa,sdl")
148 ;; Make build and test output verbose to facilitate investigation upon failure.
149 #:make-flags '("V=1")
150 #:modules ((srfi srfi-1)
152 ,@%gnu-build-system-modules)
154 (modify-phases %standard-phases
155 (add-after 'set-paths 'hide-glibc
156 (lambda* (#:key inputs #:allow-other-keys)
157 ;; Work around https://issues.guix.info/issue/36882. We need to
158 ;; remove glibc from C_INCLUDE_PATH so that the one hardcoded in GCC,
159 ;; at the bottom of GCC include search-path is used.
160 (let* ((filters '("libc"))
162 (filter-map (lambda (input)
165 (and (not (member name filters))
168 (set-path-environment-variable "C_INCLUDE_PATH"
173 (lambda* (#:key inputs outputs (configure-flags '())
175 ;; The `configure' script doesn't understand some of the
176 ;; GNU options. Thus, add a new phase that's compatible.
177 (let ((out (assoc-ref outputs "out")))
178 (setenv "SHELL" (which "bash"))
180 ;; While we're at it, patch for tests.
181 (substitute* "tests/libqtest.c"
182 (("/bin/sh") (which "sh")))
184 ;; The binaries need to be linked against -lrt.
185 (setenv "LDFLAGS" "-lrt")
188 ,(string-append "--cc=" (which "gcc"))
189 ;; Some architectures insist on using HOST_CC
190 ,(string-append "--host-cc=" (which "gcc"))
191 "--disable-debug-info" ; save build space
192 "--enable-virtfs" ; just to be sure
193 ,(string-append "--prefix=" out)
194 ,(string-append "--sysconfdir=/etc")
195 ,@configure-flags)))))
196 (add-after 'install 'install-info
197 (lambda* (#:key inputs outputs #:allow-other-keys)
198 ;; Install the Info manual, unless Texinfo is missing.
199 (when (assoc-ref inputs "texinfo")
200 (let* ((out (assoc-ref outputs "out"))
201 (dir (string-append out "/share/info")))
202 (invoke "make" "info")
203 (for-each (lambda (info)
204 (install-file info dir))
205 (find-files "." "\\.info"))))
207 ;; Create a wrapper for Samba. This allows QEMU to use Samba without
208 ;; pulling it in as an input. Note that you need to explicitly install
209 ;; Samba in your Guix profile for Samba support.
210 (add-after 'install-info 'create-samba-wrapper
211 (lambda* (#:key inputs outputs #:allow-other-keys)
212 (let* ((out (assoc-ref %outputs "out"))
213 (libexec (string-append out "/libexec")))
214 (call-with-output-file "samba-wrapper"
216 (format port "#!/bin/sh
218 (chmod "samba-wrapper" #o755)
219 (install-file "samba-wrapper" libexec))
221 (add-before 'configure 'prevent-network-configuration
223 ;; Prevent the build from trying to use git to fetch from the net.
224 (substitute* "Makefile"
225 (("@./config.status")
227 (add-before 'check 'disable-unusable-tests
228 (lambda* (#:key inputs outputs #:allow-other-keys)
229 (substitute* "tests/Makefile.include"
230 ;; Comment out the test-qga test, which needs /sys and
231 ;; fails within the build environment.
232 (("check-unit-.* tests/test-qga" all)
233 (string-append "# " all)))
234 (substitute* "tests/Makefile.include"
235 ;; Comment out the test-char test, which needs networking and
236 ;; fails within the build environment.
237 (("check-unit-.* tests/test-char" all)
238 (string-append "# " all)))
240 (inputs ; TODO: Add optional inputs.
241 `(("alsa-lib" ,alsa-lib)
247 ("libcacard" ,libcacard) ; smartcard support
248 ("libcap" ,libcap) ; virtfs support requires libcap & libattr
250 ("libepoxy" ,libepoxy)
251 ("libjpeg" ,libjpeg-turbo)
253 ("libseccomp" ,libseccomp)
254 ("libusb" ,libusb) ;USB pass-through support
257 ;; ("pciutils" ,pciutils)
259 ("pulseaudio" ,pulseaudio)
262 ("usbredir" ,usbredir)
263 ("util-linux" ,util-linux)
265 ("virglrenderer" ,virglrenderer)
267 (native-inputs `(("gettext" ,gettext-minimal)
268 ("glib:bin" ,glib "bin") ; gtester, etc.
272 ("pkg-config" ,pkg-config)
273 ("python-wrapper" ,python-wrapper)
274 ("python-sphinx" ,python-sphinx)
275 ("texinfo" ,texinfo)))
276 (home-page "https://www.qemu.org")
277 (synopsis "Machine emulator and virtualizer")
279 "QEMU is a generic machine emulator and virtualizer.
281 When used as a machine emulator, QEMU can run OSes and programs made for one
282 machine (e.g. an ARM board) on a different machine---e.g., your own PC. By
283 using dynamic translation, it achieves very good performance.
285 When used as a virtualizer, QEMU achieves near native performances by
286 executing the guest code directly on the host CPU. QEMU supports
287 virtualization when executing under the Xen hypervisor or using
288 the KVM kernel module in Linux. When using KVM, QEMU can virtualize x86,
289 server and embedded PowerPC, and S390 guests.")
291 ;; Many files are GPLv2+, but some are GPLv2-only---e.g., `memory.c'.
292 (license license:gpl2)
294 ;; Several tests fail on MIPS; see <http://hydra.gnu.org/build/117914>.
295 (supported-systems (fold delete %supported-systems
296 '("mips64el-linux" "i586-gnu")))))
298 (define-public qemu-minimal
299 ;; QEMU without GUI support.
300 (package (inherit qemu)
301 (name "qemu-minimal")
302 (synopsis "Machine emulator and virtualizer (without GUI)")
304 (substitute-keyword-arguments (package-arguments qemu)
305 ((#:configure-flags _ '(list))
306 ;; Restrict to the targets supported by Guix.
307 ''("--target-list=i386-softmmu,x86_64-softmmu,mips64el-softmmu,arm-softmmu,aarch64-softmmu"))))
309 ;; Remove dependencies on optional libraries, notably GUI libraries.
310 (native-inputs (fold alist-delete (package-native-inputs qemu)
312 (inputs (fold alist-delete (package-inputs qemu)
313 '("libusb" "mesa" "sdl2" "spice" "virglrenderer" "gtk+"
314 "usbredir" "libdrm" "libepoxy" "pulseaudio" "vde2"
317 (define-public libosinfo
324 (uri (string-append "https://releases.pagure.org/libosinfo/libosinfo-"
328 "1s97sv24bybggjx6hgqba2qdqz3ivfpd4cmkh4zm5y59sim109mv"))))
329 (build-system meson-build-system)
332 (list (string-append "-Dwith-usb-ids-path="
333 (assoc-ref %build-inputs "usb.ids"))
334 (string-append "-Dwith-pci-ids-path="
335 (assoc-ref %build-inputs "pci.ids")))
337 (modify-phases %standard-phases
338 (add-after 'unpack 'patch-osinfo-path
339 (lambda* (#:key inputs #:allow-other-keys)
340 (substitute* "osinfo/osinfo_loader.c"
341 (("path = DATA_DIR.*")
342 (string-append "path = \"" (assoc-ref inputs "osinfo-db")
343 "/share/osinfo\";")))
346 `(("libsoup" ,libsoup)
349 ("osinfo-db" ,osinfo-db)))
351 `(("glib" ,glib "bin") ; glib-mkenums, etc.
352 ("gobject-introspection" ,gobject-introspection)
355 ("intltool" ,intltool)
356 ("pkg-config" ,pkg-config)
360 (uri "https://github.com/pciutils/pciids/raw/ad02084f0bc143e3c15e31a6152a3dfb1d7a3156/pci.ids")
363 "0kfhpj5rnh24hz2714qhfmxk281vwc2w50sm73ggw5d15af7zfsw"))))
367 (uri "https://svn.code.sf.net/p/linux-usb/repo/trunk/htdocs/usb.ids?r=2681")
368 (file-name "usb.ids")
371 "1m6yhvz5k8aqzxgk7xj3jkk8frl1hbv0h3vgj4wbnvnx79qnvz3r"))))))
372 (home-page "https://libosinfo.org/")
373 (synopsis "Operating system information database")
374 (description "libosinfo is a GObject based library API for managing
375 information about operating systems, hypervisors and the (virtual) hardware
376 devices they can support. It includes a database containing device metadata
377 and provides APIs to match/identify optimal devices for deploying an operating
378 system on a hypervisor. Via GObject Introspection, the API is available in
379 all common programming languages. Vala bindings are also provided.")
380 ;; The library files are released under LGPLv2.1 or later; the source
381 ;; files in the "tools" directory are released under GPLv2+.
382 (license (list license:lgpl2.1+ license:gpl2+))))
391 "https://linuxcontainers.org/downloads/lxc/lxc-"
395 "1igxqgx8q9cp15mcp1y8j564bl85ijw04jcmgb1s5bmfbg1751sd"))))
396 (build-system gnu-build-system)
398 `(("pkg-config" ,pkg-config)))
402 ("libseccomp" ,libseccomp)
403 ("libselinux" ,libselinux)))
406 (list (string-append "--docdir=" (assoc-ref %outputs "out")
407 "/share/doc/" ,name "-" ,version)
409 "--localstatedir=/var")
411 (modify-phases %standard-phases
413 (lambda* (#:key outputs #:allow-other-keys)
414 (let* ((out (assoc-ref outputs "out"))
415 (bashcompdir (string-append out "/etc/bash_completion.d")))
416 (invoke "make" "install"
417 (string-append "bashcompdir=" bashcompdir)
418 ;; Don't install files into /var and /etc.
419 "LXCPATH=/tmp/var/lib/lxc"
420 "localstatedir=/tmp/var"
421 "sysconfdir=/tmp/etc"
422 "sysconfigdir=/tmp/etc/default")))))))
423 (synopsis "Linux container tools")
424 (home-page "https://linuxcontainers.org/")
426 "LXC is a userspace interface for the Linux kernel containment features.
427 Through a powerful API and simple tools, it lets Linux users easily create and
428 manage system or application containers.")
429 (license license:lgpl2.1+)))
431 (define-public libvirt
438 (uri (string-append "https://libvirt.org/sources/libvirt-"
441 (base32 "0m8cqaqflvys5kaqpvb0qr4k365j09jc5xk6x70yvg8qkcl2hcz2"))
443 (search-patches "libvirt-create-machine-cgroup.patch"))))
444 (build-system gnu-build-system)
448 "--with-qemu-user=nobody"
449 "--with-qemu-group=kvm"
451 (string-append "--docdir=" (assoc-ref %outputs "out") "/share/doc/"
454 "--localstatedir=/var")
456 (modify-phases %standard-phases
457 (add-before 'configure 'fix-BOURNE_SHELL-definition
458 ;; BOURNE_SHELL is hard-#defined to ‘/bin/sh’, causing test failures.
460 (substitute* "config.h.in"
461 (("/bin/sh") (which "sh")))
463 (add-before 'configure 'patch-libtirpc-file-names
464 (lambda* (#:key inputs #:allow-other-keys)
465 ;; libvirt uses an m4 macro instead of pkg-config to determine where
466 ;; the RPC headers are located. Tell it to look in the right place.
467 (substitute* "configure"
468 (("/usr/include/tirpc") ;defined in m4/virt-xdr.m4
469 (string-append (assoc-ref inputs "libtirpc")
472 (add-before 'configure 'disable-broken-tests
474 (let ((tests (list "commandtest" ; hangs idly
475 "qemuxml2argvtest" ; fails
476 "qemuhotplugtest" ; fails
477 "virnetsockettest" ; tries to network
478 "virshtest"))) ; fails
479 (substitute* "tests/Makefile.in"
480 (((format #f "(~a)\\$\\(EXEEXT\\)" (string-join tests "|")))
484 ;; Since the sysconfdir and localstatedir should be /etc and /var
485 ;; at runtime, we must prevent writing to them at installation
487 (lambda* (#:key make-flags #:allow-other-keys)
488 (apply invoke "make" "install"
489 "sysconfdir=/tmp/etc"
490 "localstatedir=/tmp/var"
493 `(("libxml2" ,libxml2)
495 ("libpciaccess" ,libpciaccess)
500 ("libtirpc" ,libtirpc) ;for <rpc/rpc.h>
501 ("libuuid" ,util-linux "lib")
502 ("lvm2" ,lvm2) ;for libdevmapper
505 ("cyrus-sasl" ,cyrus-sasl)
508 ("dmidecode" ,dmidecode)
510 ("ebtables" ,ebtables)
512 ("iptables" ,iptables)))
514 `(("xsltproc" ,libxslt)
516 ("pkg-config" ,pkg-config)
518 ("python" ,python-wrapper)))
519 (home-page "https://libvirt.org")
520 (synopsis "Simple API for virtualization")
521 (description "Libvirt is a C toolkit to interact with the virtualization
522 capabilities of recent versions of Linux. The library aims at providing long
523 term stable C API initially for the Xen paravirtualization but should be able
524 to integrate other virtualization mechanisms if needed.")
525 (license license:lgpl2.1+)))
527 (define-public libvirt-glib
529 (name "libvirt-glib")
533 (uri (string-append "ftp://libvirt.org/libvirt/glib/"
534 "libvirt-glib-" version ".tar.gz"))
537 "1zpbv4ninc57c9rw4zmmkvvqn7154iv1qfr20kyxn8xplalqrzvz"))))
538 (build-system gnu-build-system)
540 `(("openssl" ,openssl)
541 ("cyrus-sasl" ,cyrus-sasl)
542 ("lvm2" ,lvm2) ; for libdevmapper
543 ("libyajl" ,libyajl)))
545 `(("pkg-config" ,pkg-config)
546 ("intltool" ,intltool)
550 ;; ‘Required:’ by the installed .pc files.
554 ("gobject-introspection" ,gobject-introspection)))
555 (home-page "https://libvirt.org")
556 (synopsis "GLib wrapper around libvirt")
557 (description "libvirt-glib wraps the libvirt library to provide a
558 high-level object-oriented API better suited for glib-based applications, via
562 @item libvirt-glib - GLib main loop integration & misc helper APIs
563 @item libvirt-gconfig - GObjects for manipulating libvirt XML documents
564 @item libvirt-gobject - GObjects for managing libvirt objects
567 (license license:lgpl2.1+)))
569 (define-public python-libvirt
571 (name "python-libvirt")
576 (uri (string-append "https://libvirt.org/sources/python/libvirt-python-"
579 (base32 "0kyz3lx49d8p75mvbzinxc1zgs8g7adn77y9bm15b8b4ad9zl5s6"))))
580 (build-system python-build-system)
583 (modify-phases %standard-phases
584 (add-after 'unpack 'patch-nosetests-path
585 (lambda* (#:key inputs #:allow-other-keys)
586 (substitute* "setup.py"
587 (("\"/usr/bin/nosetests\"")
588 (string-append "\"" (which "nosetests") "\""))
589 (("self\\.spawn\\(\\[sys\\.executable, nose\\]\\)")
590 (format #f "self.spawn([\"~a\", nose])" (which "bash"))))
593 `(("libvirt" ,libvirt)))
595 `(("python-lxml" ,python-lxml)))
597 `(("pkg-config" ,pkg-config)
598 ("python-nose" ,python-nose)))
599 (home-page "https://libvirt.org")
600 (synopsis "Python bindings to libvirt")
601 (description "This package provides Python bindings to the libvirt
602 virtualization library.")
603 (license license:lgpl2.1+)))
605 (define-public python2-libvirt
606 (package-with-python2 python-libvirt))
608 (define-public virt-manager
610 (name "virt-manager")
614 (uri (string-append "https://virt-manager.org/download/sources"
615 "/virt-manager/virt-manager-"
619 "06ws0agxlip6p6n3n43knsnjyd91gqhh2dadgc33wl9lx1k8vn6g"))))
620 (build-system python-build-system)
622 `(#:use-setuptools? #f ; uses custom distutils 'install' command
623 ;; Some of the tests seem to require network access to install virtual
626 #:imported-modules ((guix build glib-or-gtk-build-system)
627 ,@%python-build-system-modules)
628 #:modules ((ice-9 match)
630 (guix build python-build-system)
631 ((guix build glib-or-gtk-build-system) #:prefix glib-or-gtk:)
634 (modify-phases %standard-phases
635 (add-after 'unpack 'fix-setup
636 (lambda* (#:key outputs #:allow-other-keys)
637 (substitute* "virtinst/buildconfig.py"
638 (("/usr") (assoc-ref outputs "out")))
640 (add-after 'unpack 'fix-qemu-img-reference
641 (lambda* (#:key inputs #:allow-other-keys)
642 (substitute* "virtconv/formats.py"
643 (("/usr(/bin/qemu-img)" _ suffix)
644 (string-append (assoc-ref inputs "qemu") suffix)))
646 (add-after 'unpack 'fix-default-uri
647 (lambda* (#:key inputs #:allow-other-keys)
648 ;; Xen is not available for now - so only patch qemu.
649 (substitute* "virtManager/createconn.py"
650 (("/usr(/bin/qemu-system)" _ suffix)
651 (string-append (assoc-ref inputs "qemu") suffix)))
653 (add-before 'wrap 'wrap-with-GI_TYPELIB_PATH
654 (lambda* (#:key inputs outputs #:allow-other-keys)
655 (let* ((bin (string-append (assoc-ref outputs "out") "/bin"))
656 (bin-files (find-files bin ".*"))
657 (paths (map (match-lambda
658 ((output . directory)
659 (let* ((girepodir (string-append
661 "/lib/girepository-1.0")))
662 (if (file-exists? girepodir)
665 (for-each (lambda (file)
666 (format #t "wrapping ~a\n" file)
668 `("GI_TYPELIB_PATH" ":" prefix
669 ,(filter identity paths))))
672 (add-after 'install 'glib-or-gtk-compile-schemas
673 (assoc-ref glib-or-gtk:%standard-phases 'glib-or-gtk-compile-schemas))
674 (add-after 'install 'glib-or-gtk-wrap
675 (assoc-ref glib-or-gtk:%standard-phases 'glib-or-gtk-wrap)))))
680 ("gtksourceview" ,gtksourceview)
682 ("libvirt-glib" ,libvirt-glib)
683 ("libosinfo" ,libosinfo)
685 ("python-libvirt" ,python-libvirt)
686 ("python-requests" ,python-requests)
687 ("python-ipaddress" ,python-ipaddress)
688 ("python-pycairo" ,python-pycairo)
689 ("python-pygobject" ,python-pygobject)
690 ("python-libxml2" ,python-libxml2)
691 ("spice-gtk" ,spice-gtk)))
692 ;; virt-manager searches for qemu-img or kvm-img in the PATH.
696 `(("glib" ,glib "bin") ; glib-compile-schemas
697 ("gobject-introspection" ,gobject-introspection)
698 ("gtk+" ,gtk+ "bin") ; gtk-update-icon-cache
699 ("perl" ,perl) ; pod2man
700 ("intltool" ,intltool)))
701 (home-page "https://virt-manager.org/")
702 (synopsis "Manage virtual machines")
704 "The virt-manager application is a desktop user interface for managing
705 virtual machines through libvirt. It primarily targets KVM VMs, but also
706 manages Xen and LXC (Linux containers). It presents a summary view of running
707 domains, their live performance and resource utilization statistics.")
708 (license license:gpl2+)))
716 (uri (string-append "http://download.openvz.org/criu/criu-"
720 "1yn9ix9lqvqvjrs3a3g6g1wqfniyf9n7giy0mr3jvijmrcm7y0pa"))))
721 (build-system gnu-build-system)
723 `(#:test-target "test"
724 #:tests? #f ; tests require mounting as root
726 (list (string-append "PREFIX=" (assoc-ref %outputs "out"))
727 (string-append "LIBDIR=" (assoc-ref %outputs "out")
729 (string-append "ASCIIDOC=" (assoc-ref %build-inputs "asciidoc")
731 (string-append "XMLTO=" (assoc-ref %build-inputs "xmlto")
734 (modify-phases %standard-phases
736 (lambda* (#:key inputs #:allow-other-keys)
737 ;; The includes for libnl are located in a sub-directory.
738 (setenv "C_INCLUDE_PATH"
739 (string-append (assoc-ref inputs "libnl")
741 (or (getenv "C_INCLUDE_PATH") "")))
743 (add-after 'configure 'fix-documentation
744 (lambda* (#:key inputs outputs #:allow-other-keys)
745 (substitute* "Documentation/Makefile"
748 "-m custom.xsl --skip-validation -x "
749 (assoc-ref inputs "docbook-xsl") "/xml/xsl/"
750 ,(package-name docbook-xsl) "-"
751 ,(package-version docbook-xsl)
752 "/manpages/docbook.xsl")))
754 (add-after 'unpack 'hardcode-variables
755 (lambda* (#:key inputs #:allow-other-keys)
756 ;; Hardcode arm version detection
757 (substitute* "Makefile"
758 (("ARMV.*:=.*") "ARMV := 7\n"))
759 ;; We are currently using python-2
760 (substitute* "crit/Makefile"
761 (("\\$\\(PYTHON\\)") "python2"))
762 (substitute* "lib/Makefile"
764 (string-append (assoc-ref inputs "python")
767 (add-before 'build 'fix-symlink
768 (lambda* (#:key inputs #:allow-other-keys)
769 ;; The file 'images/google/protobuf/descriptor.proto' points to
770 ;; /usr/include/..., which obviously does not exist.
771 (let* ((file "google/protobuf/descriptor.proto")
772 (target (string-append "images/" file))
773 (source (string-append (assoc-ref inputs "protobuf")
776 (symlink source target)
778 (add-after 'install 'wrap
779 (lambda* (#:key inputs outputs #:allow-other-keys)
780 ;; Make sure 'crit' runs with the correct PYTHONPATH.
781 (let* ((out (assoc-ref outputs "out"))
782 (path (string-append out
784 (string-take (string-take-right
785 (assoc-ref inputs "python") 5) 3)
787 (getenv "PYTHONPATH"))))
788 (wrap-program (string-append out "/bin/crit")
789 `("PYTHONPATH" ":" prefix (,path))))
792 `(("protobuf" ,protobuf)
794 ("python2-protobuf" ,python2-protobuf)
795 ("python2-ipaddr" ,python2-ipaddr)
803 `(("pkg-config" ,pkg-config)
805 ("protobuf-c" ,protobuf-c)
806 ("asciidoc" ,asciidoc)
808 ("docbook-xml" ,docbook-xml)
809 ("docbook-xsl" ,docbook-xsl)))
810 (home-page "https://criu.org")
811 (synopsis "Checkpoint and restore in user space")
812 (description "Using this tool, you can freeze a running application (or
813 part of it) and checkpoint it to a hard drive as a collection of files. You
814 can then use the files to restore and run the application from the point it
815 was frozen at. The distinctive feature of the CRIU project is that it is
816 mainly implemented in user space.")
817 ;; The project is licensed under GPLv2; files in the lib/ directory are
819 (license (list license:gpl2 license:lgpl2.1))))
821 (define-public qmpbackup
828 (url "https://github.com/abbbi/qmpbackup.git")
830 (file-name (git-file-name name version))
833 "0swhp5byz44brhyis1a39p11fyn9q84xz5q6v2fah29r7d71kmmx"))))
834 (build-system python-build-system)
836 `(#:python ,python-2))
837 (home-page "https://github.com/abbbi/qmpbackup")
838 (synopsis "Backup and restore QEMU machines")
839 (description "qmpbackup is designed to create and restore full and
840 incremental backups of running QEMU virtual machines via QMP, the QEMU
842 (license license:gpl3+)))
844 (define-public looking-glass-client
845 (let ((commit "182c4752d57690da7f99d5e788de9b8baea33895"))
847 (name "looking-glass-client")
848 (version (string-append "a12-" (string-take commit 7)))
852 (uri (git-reference (url "https://github.com/gnif/LookingGlass")
854 (file-name (git-file-name name version))
857 "02bq46ndmzq9cihazzn7xq1x7q5nzm7iw4l9lqzihxcxp9famkhw"))
858 (modules '((guix build utils)))
861 ;; Do not create binaries optimized for the CPU of the build machine,
862 ;; for reproducibility and compatibility. TODO: in the next version
863 ;; of looking glass, this is exposed as a CMake configure option.
864 (substitute* "client/CMakeLists.txt"
868 (build-system cmake-build-system)
869 (inputs `(("fontconfig" ,fontconfig)
874 ("sdl2-ttf" ,sdl2-ttf)
875 ("spice-protocol" ,spice-protocol)
876 ("wayland" ,wayland)))
877 (native-inputs `(("libconfig" ,libconfig)
879 ("pkg-config" ,pkg-config)))
881 `(#:tests? #f ;; No tests are available.
882 #:make-flags '("CC=gcc")
883 #:phases (modify-phases %standard-phases
884 (add-before 'configure 'chdir-to-client
885 (lambda* (#:key outputs #:allow-other-keys)
888 (add-after 'chdir-to-client 'add-missing-include
890 ;; Mimic upstream commit b9797529893, required since the
891 ;; update to Mesa 19.2.
892 (substitute* "renderers/egl/shader.h"
893 (("#include <stdbool\\.h>")
894 "#include <stdbool.h>\n#include <stddef.h>"))
897 (lambda* (#:key outputs #:allow-other-keys)
898 (install-file "looking-glass-client"
899 (string-append (assoc-ref outputs "out")
902 (home-page "https://looking-glass.hostfission.com")
903 (synopsis "KVM Frame Relay (KVMFR) implementation")
904 (description "Looking Glass allows the use of a KVM (Kernel-based Virtual
905 Machine) configured for VGA PCI Pass-through without an attached physical
906 monitor, keyboard or mouse. It displays the VM's rendered contents on your main
908 ;; This package requires SSE instructions.
909 (supported-systems '("i686-linux" "x86_64-linux"))
910 (license license:gpl2+))))
915 (version "1.0.0-rc6")
919 "https://github.com/opencontainers/runc/releases/"
920 "download/v" version "/runc.tar.xz"))
921 (file-name (string-append name "-" version ".tar.xz"))
922 (patches (search-patches "runc-CVE-2019-5736.patch"))
925 "1c7832dq70slkjh8qp2civ1wxhhdd2hrx84pq7db1mmqc9fdr3cc"))))
926 (build-system go-build-system)
928 '(#:import-path "github.com/opencontainers/runc"
930 ;; XXX: 20/139 tests fail due to missing /var, cgroups and apparmor in
931 ;; the build environment.
934 (modify-phases %standard-phases
936 (lambda* (#:key source import-path #:allow-other-keys)
937 ;; Unpack the tarball into 'runc' instead of 'runc-1.0.0-rc5'.
938 (let ((dest (string-append "src/" import-path)))
940 (invoke "tar" "-C" (string-append "src/" import-path)
941 "--strip-components=1"
944 (lambda* (#:key import-path #:allow-other-keys)
945 (chdir (string-append "src/" import-path))
946 ;; XXX: requires 'go-md2man'.
947 ;; (invoke "make" "man")
951 ;; (invoke "make" "localunittest")))
953 (lambda* (#:key outputs #:allow-other-keys)
954 (let ((out (assoc-ref outputs "out")))
955 (invoke "make" "install" "install-bash"
956 (string-append "PREFIX=" out))))))))
958 `(("pkg-config" ,pkg-config)))
960 `(("libseccomp" ,libseccomp)))
961 (synopsis "Open container initiative runtime")
962 (home-page "https://www.opencontainers.org/")
964 "@command{runc} is a command line client for running applications
965 packaged according to the
966 @uref{https://github.com/opencontainers/runtime-spec/blob/master/spec.md, Open
967 Container Initiative (OCI) format} and is a compliant implementation of the
968 Open Container Initiative specification.")
969 (license license:asl2.0)))
978 "https://github.com/openSUSE/umoci/releases/download/v"
979 version "/umoci.tar.xz"))
980 (file-name (string-append "umoci-" version ".tar.xz"))
983 "0x1yyvpllz6fyy9xip6f7b6c94v984n3faf8p50fr9y4ygkgi15a"))))
984 (build-system go-build-system)
986 '(#:import-path "github.com/openSUSE/umoci"
989 (modify-phases %standard-phases
991 (lambda* (#:key source import-path #:allow-other-keys)
992 ;; Unpack the tarball into 'umoci' instead of "runc-${version}".
993 (let ((dest (string-append "src/" import-path)))
995 (invoke "tar" "-C" (string-append "src/" import-path)
996 "--strip-components=1"
999 (lambda* (#:key import-path #:allow-other-keys)
1000 (chdir (string-append "src/" import-path))
1001 ;; TODO: build manpages with 'go-md2man'.
1002 (invoke "make" "SHELL=bash")))
1004 (lambda* (#:key outputs #:allow-other-keys)
1005 (let* ((out (assoc-ref outputs "out"))
1006 (bindir (string-append out "/bin")))
1007 (install-file "umoci" bindir)
1009 (home-page "https://umo.ci/")
1010 (synopsis "Tool for modifying Open Container images")
1012 "@command{umoci} is a tool that allows for high-level modification of an
1013 Open Container Initiative (OCI) image layout and its tagged images.")
1014 (license license:asl2.0)))
1016 (define-public skopeo
1023 (url "https://github.com/projectatomic/skopeo")
1024 (commit (string-append "v" version))))
1025 (file-name (git-file-name name version))
1028 "1bagirzdzjhicn5dr691092ac3q6lhz3xngjzgqiqkxnvpz7p6cn"))))
1029 (build-system go-build-system)
1031 `(("pkg-config" ,pkg-config)))
1033 `(("btrfs-progs" ,btrfs-progs)
1035 ("libassuan" ,libassuan)
1036 ("libselinux" ,libselinux)
1037 ("libostree" ,libostree)
1042 '(#:import-path "github.com/projectatomic/skopeo"
1043 #:install-source? #f
1044 #:tests? #f ; The tests require Docker
1046 (modify-phases %standard-phases
1048 (lambda* (#:key import-path #:allow-other-keys)
1049 (chdir (string-append "src/" import-path))
1050 ;; TODO: build manpages with 'go-md2man'.
1051 (invoke "make" "binary-local")))
1053 (lambda* (#:key outputs #:allow-other-keys)
1054 (let ((out (assoc-ref outputs "out")))
1055 (invoke "make" "install-binary" "install-completions"
1056 (string-append "PREFIX=" out))))))))
1057 (home-page "https://github.com/projectatomic/skopeo")
1058 (synopsis "Interact with container images and container image registries")
1060 "@command{skopeo} is a command line utility providing various operations
1061 with container images and container image registries. It can:
1064 @item Copy container images between various containers image stores,
1065 converting them as necessary.
1067 @item Convert a Docker schema 2 or schema 1 container image to an OCI image.
1069 @item Inspect a repository on a container registry without needlessly pulling
1072 @item Sign and verify container images.
1074 @item Delete container images from a remote container registry.
1077 (license license:asl2.0)))
1079 (define-public python-vagrant
1081 (name "python-vagrant")
1086 (uri (pypi-uri "python-vagrant" version))
1089 "1ikrh6canhcxg5y7pzmkcnnydikppv7s6sm9prfx90nk0ac8m6mg"))))
1090 (build-system python-build-system)
1092 '(#:tests? #f)) ; tests involve running vagrant.
1093 (home-page "https://github.com/todddeluca/python-vagrant")
1094 (synopsis "Python bindings for Vagrant")
1096 "Python-vagrant is a Python module that provides a thin wrapper around the
1097 @code{vagrant} command line executable, allowing programmatic control of Vagrant
1099 (license license:expat)))
1101 (define-public bubblewrap
1107 (uri (string-append "https://github.com/containers/bubblewrap/"
1108 "releases/download/v" version "/bubblewrap-"
1112 "00ycgi6q2yngh06bnz50wkvar6r2jnjf3j158grhi9k13jdrpimr"))))
1113 (build-system gnu-build-system)
1116 (modify-phases %standard-phases
1117 (add-after 'unpack 'fix-test
1118 (lambda* (#:key outputs #:allow-other-keys)
1119 ;; Tests try to access /var/tmp, which is not possible in our build
1120 ;; environment. Let's give them another directory.
1121 ;; /tmp gets overriden in some tests, so we need another directory.
1122 ;; the only possibility is the output directory.
1123 (let ((tmp-dir (string-append (assoc-ref outputs "out") "/tmp")))
1125 (substitute* "tests/test-run.sh"
1126 (("/var/tmp") tmp-dir)
1127 ;; Tests create a temporary python script, so fix its shebang.
1128 (("/usr/bin/env python") (which "python"))
1129 ;; Some tests try to access /usr, but that doesn't exist.
1130 ;; Give them /gnu instead.
1132 (("--ro-bind /bin /bin") "--ro-bind /gnu /bin")
1133 (("--ro-bind /sbin /sbin") "--ro-bind /gnu /sbin")
1134 (("--ro-bind /lib /lib") "--ro-bind /gnu /lib")
1135 ((" */bin/bash") (which "bash"))
1136 (("/bin/sh") (which "sh"))
1137 (("findmnt") (which "findmnt"))))
1139 ;; Remove the directory we gave to tests to have a clean package.
1140 (add-after 'check 'remove-tmp-dir
1141 (lambda* (#:key outputs #:allow-other-keys)
1142 (delete-file-recursively (string-append (assoc-ref outputs "out") "/tmp"))
1145 `(("libcap" ,libcap)))
1147 `(("python-2" ,python-2)
1148 ("util-linux" ,util-linux)))
1149 (home-page "https://github.com/containers/bubblewrap")
1150 (synopsis "Unprivileged sandboxing tool")
1151 (description "Bubblewrap is aimed at running applications in a sandbox,
1152 restricting their access to parts of the operating system or user data such as
1153 the home directory. Bubblewrap always creates a new mount namespace, and the
1154 user can specify exactly what parts of the file system should be made visible
1155 in the sandbox. These directories are mounted with the @code{nodev} option
1156 by default and can be made read-only.")
1157 (license license:lgpl2.0+)))
1159 (define-public bochs
1166 (uri (string-append "https://sourceforge.net/projects/bochs/files/bochs/"
1167 version "/bochs-" version ".tar.gz"))
1169 (base32 "0ql8q6y1k356li1g9gbvl21448mlxphxxi6kjb2b3pxvzd0pp2b3"))))
1170 (build-system gnu-build-system)
1172 `(#:tests? #f)) ; no tests exist
1174 `(("libxrandr" ,libxrandr)))
1175 (home-page "http://bochs.sourceforge.net/")
1176 (synopsis "Emulator for x86 PC")
1178 "Bochs is an emulator which can emulate Intel x86 CPU, common I/O
1179 devices, and a custom BIOS. It can also be compiled to emulate many different
1180 x86 CPUs, from early 386 to the most recent x86-64 Intel and AMD processors.
1181 Bochs can run most Operating Systems inside the emulation including Linux,
1182 DOS or Microsoft Windows.")
1183 (license license:lgpl2.0+)))
1192 (url "git://xenbits.xenproject.org/xen.git")
1193 (commit (string-append "RELEASE-" version))))
1194 (file-name (git-file-name name version))
1197 "0py50n995gv909i0d1lfdcj9wcp5g1d5z6m2291jqqlfyany138g"))))
1198 (build-system gnu-build-system)
1201 (list "--enable-rpath"
1202 "--disable-qemu-traditional" ; It tries to do "git clone"
1203 "--disable-rombios" ; would try to "git clone" via etherboot.
1204 ;; TODO: Re-enable stubdom (it's "more secure" to use it).
1205 "--disable-stubdom" ; tries to "git clone" old patched newlib.
1206 (string-append "--with-initddir="
1207 (assoc-ref %outputs "out")
1209 (string-append "--with-system-qemu="
1210 (assoc-ref %build-inputs "qemu")
1211 "/bin/qemu-system-i386")
1212 (string-append "--with-system-seabios="
1213 (assoc-ref %build-inputs "seabios")
1214 "/share/firmware/bios.bin")
1215 (string-append "--with-system-ovmf="
1216 (assoc-ref %build-inputs "ovmf")
1217 "/share/firmware/ovmf_ia32.bin"))
1218 #:make-flags (list "-j" "1"
1219 "XEN_BUILD_DATE=Thu Jan 1 01:00:01 CET 1970"
1220 "XEN_BUILD_TIME=01:00:01"
1223 "SMBIOS_REL_DATE=01/01/1970"
1224 "VGABIOS_REL_DATE=01 Jan 1970"
1225 ; QEMU_TRADITIONAL_LOC
1227 "SYSCONFIG_DIR=/tmp/etc/default"
1228 (string-append "BASH_COMPLETION_DIR="
1229 (assoc-ref %outputs "out")
1230 "/etc/bash_completion.d")
1231 (string-append "BOOT_DIR="
1232 (assoc-ref %outputs "out")
1234 (string-append "DEBUG_DIR="
1235 (assoc-ref %outputs "out")
1237 (string-append "EFI_DIR="
1238 (assoc-ref %outputs "out")
1239 "/lib/efi") ; TODO lib64 ?
1240 "MINIOS_UPSTREAM_URL="
1241 ;(string-append "DISTDIR="
1242 ; (assoc-ref %outputs "out"))
1244 #:test-target "test"
1246 (modify-phases %standard-phases
1247 (add-after 'unpack 'unpack-mini-os
1248 (lambda* (#:key inputs #:allow-other-keys)
1249 (copy-recursively (assoc-ref inputs "mini-os") "extras/mini-os")
1251 (add-after 'unpack-mini-os 'patch
1252 (lambda* (#:key inputs outputs #:allow-other-keys)
1253 (substitute* "tools/firmware/Rules.mk"
1254 (("override XEN_TARGET_ARCH = x86_32")
1255 (string-append "override XEN_TARGET_ARCH = x86_32
1256 override CC = " (assoc-ref inputs "cross-gcc") "/bin/i686-linux-gnu-gcc"))
1258 (string-append "CFLAGS=-I" (assoc-ref inputs "cross-libc")
1260 (substitute* "config/x86_32.mk"
1261 (("CFLAGS += -m32 -march=i686")
1262 (string-append "CFLAGS += -march=i686 -I"
1263 (assoc-ref inputs "cross-libc")
1265 ;; /var is not in /gnu/store , so don't try to create it.
1266 (substitute* '("tools/Makefile"
1267 "tools/xenstore/Makefile"
1268 "tools/xenpaging/Makefile")
1269 (("\\$\\(INSTALL_DIR\\) .*XEN_(DUMP|LOG|RUN|LIB|PAGING)_DIR.*")
1271 (("\\$\\(INSTALL_DIR\\) .*XEN_(RUN|LIB)_STORED.*")
1273 ;; Prevent xen from creating /etc .
1274 (substitute* "tools/examples/Makefile"
1275 ((" install-readmes") "")
1276 ((" install-configs") ""))
1278 (substitute* "tools/pygrub/setup.py"
1280 ; TODO: extra_link_args = ['-Wl,-rpath=/opt/foo'],
1281 (string-append "runtime_library_dirs = ['"
1282 (assoc-ref outputs "out")
1283 "/lib'],\nlibrary_dirs =")))
1285 (add-before 'configure 'patch-xen-script-directory
1286 (lambda* (#:key outputs #:allow-other-keys)
1287 (substitute* '("configure"
1290 (("XEN_SCRIPT_DIR=.*")
1291 (string-append "XEN_SCRIPT_DIR="
1292 (assoc-ref outputs "out")
1293 "/etc/xen/scripts")))
1295 (add-before 'configure 'set-environment-up
1296 (lambda* (#:key make-flags #:allow-other-keys)
1298 (string-contains x "cross-i686-linux"))
1299 (define (filter-environment! filter-predicate
1300 environment-variable-names)
1303 (let* ((env-value (getenv env-name))
1304 (search-path (search-path-as-string->list env-value))
1305 (new-search-path (filter filter-predicate
1307 (new-env-value (list->search-path-as-string
1308 new-search-path ":")))
1309 (setenv env-name new-env-value)))
1310 environment-variable-names))
1311 (setenv "CROSS_CPATH" (getenv "CPATH"))
1312 (setenv "CROSS_LIBRARY_PATH" (getenv "LIBRARY_PATH"))
1313 (filter-environment! cross?
1315 "CROSS_LIBRARY_PATH"))
1316 (filter-environment! (lambda (e) (not (cross? e)))
1319 ;; Guix tries to be helpful and automatically adds
1320 ;; mini-os-git-checkout/include to the include path,
1321 ;; but actually we don't want it to be there (yet).
1322 (filter-environment! (lambda (e)
1325 "mini-os-git-checkout")))
1328 (setenv "EFI_VENDOR" "guix")
1331 (lambda* (#:key make-flags #:allow-other-keys)
1332 (apply invoke "make" "world" make-flags))))))
1334 `(("acpica" ,acpica) ; TODO: patch iasl invocation.
1335 ("bridge-utils" ,bridge-utils) ; TODO: patch invocations.
1337 ("iproute" ,iproute) ; TODO: patch invocations.
1340 ("libyajl" ,libyajl)
1341 ("ncurses" ,ncurses)
1342 ("openssl" ,openssl)
1345 ("qemu" ,qemu-minimal)
1346 ("seabios" ,seabios)
1347 ("util-linux" ,util-linux "lib") ; uuid
1348 ; TODO: ocaml-findlib, ocaml-nox.
1349 ("xz" ,xz) ; for liblzma
1354 ("cmake" ,cmake-minimal)
1357 ("gettext" ,gettext-minimal)
1363 (url "http://xenbits.xen.org/git-http/mini-os.git")
1364 (commit (string-append "xen-RELEASE-" version))))
1367 "1i8pcl19n60i2m9vlg79q3nknpj209c9ic5x10wxaicx45kc107f"))
1368 (file-name "mini-os-git-checkout")))
1371 ("pkg-config" ,pkg-config)
1372 ("python" ,python-2)
1374 ("cross-gcc" ,(cross-gcc "i686-linux-gnu"
1375 #:xbinutils (cross-binutils "i686-linux-gnu")
1376 #:libc (cross-libc "i686-linux-gnu")))
1377 ("cross-libc" ,(cross-libc "i686-linux-gnu")) ; header files
1378 ("cross-libc-static" ,(cross-libc "i686-linux-gnu") "static")))
1379 (home-page "https://xenproject.org/")
1380 (synopsis "Xen Virtual Machine Monitor")
1381 (description "This package provides the Xen Virtual Machine Monitor
1382 which is a hypervisor.")
1383 ;; TODO: Some files are licensed differently. List those.
1384 (license license:gpl2)
1385 (supported-systems '("i686-linux" "x86_64-linux" "armhf-linux"))))
1387 (define-public osinfo-db-tools
1389 (name "osinfo-db-tools")
1393 (uri (string-append "https://releases.pagure.org/libosinfo/osinfo-db-tools-"
1398 "08x8mrafphyll0d35xdc143rip3ahrz6bmzhc85nwhq7yk2vxpab"))))
1399 (build-system meson-build-system)
1401 `(("libsoup" ,libsoup)
1402 ("libxml2" ,libxml2)
1403 ("libxslt" ,libxslt)
1404 ("json-glib" ,json-glib)
1405 ("libarchive" ,libarchive)))
1408 ("gobject-introspection" ,gobject-introspection)
1409 ("gettext" ,gettext-minimal)
1410 ("pkg-config" ,pkg-config)
1413 ("pytest" ,python-pytest)
1414 ("requests" ,python-requests)))
1415 (home-page "https://gitlab.com/libosinfo/osinfo-db-tools")
1416 (synopsis "Tools for managing the osinfo database")
1417 (description "This package contains a set of tools to assist
1418 administrators and developers in managing the database.")
1419 (license license:lgpl2.0+)))
1421 (define-public osinfo-db
1424 (version "20200203")
1427 (uri (string-append "https://releases.pagure.org/libosinfo/osinfo-db-"
1431 "1zjq1dhlci00j17dij7s3l30hybzmaykpk5b6bd5xbllp745njn5"))))
1432 (build-system trivial-build-system)
1434 `(#:modules ((guix build utils))
1437 (use-modules (guix build utils))
1438 (let* ((out (assoc-ref %outputs "out"))
1439 (osinfo-dir (string-append out "/share/osinfo"))
1440 (source (assoc-ref %build-inputs "source"))
1442 (string-append (assoc-ref %build-inputs "osinfo-db-tools")
1443 "/bin/osinfo-db-import")))
1444 (mkdir-p osinfo-dir)
1445 (invoke osinfo-db-import "--dir" osinfo-dir source)
1448 `(("intltool" ,intltool)
1449 ("osinfo-db-tools" ,osinfo-db-tools)))
1450 (home-page "https://gitlab.com/libosinfo/osinfo-db")
1451 (synopsis "Database of information about operating systems")
1452 (description "Osinfo-db provides the database files for use with the
1453 libosinfo library. It provides information about guest operating systems for
1454 use with virtualization provisioning tools")
1455 (license license:lgpl2.0+)))