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>
17 ;;; This file is part of GNU Guix.
19 ;;; GNU Guix is free software; you can redistribute it and/or modify it
20 ;;; under the terms of the GNU General Public License as published by
21 ;;; the Free Software Foundation; either version 3 of the License, or (at
22 ;;; your option) any later version.
24 ;;; GNU Guix is distributed in the hope that it will be useful, but
25 ;;; WITHOUT ANY WARRANTY; without even the implied warranty of
26 ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
27 ;;; GNU General Public License for more details.
29 ;;; You should have received a copy of the GNU General Public License
30 ;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
32 (define-module (gnu packages virtualization)
33 #:use-module (gnu packages)
34 #:use-module (gnu packages admin)
35 #:use-module (gnu packages assembly)
36 #:use-module (gnu packages attr)
37 #:use-module (gnu packages autotools)
38 #:use-module (gnu packages backup)
39 #:use-module (gnu packages bison)
40 #:use-module (gnu packages check)
41 #:use-module (gnu packages cmake)
42 #:use-module (gnu packages compression)
43 #:use-module (gnu packages cross-base)
44 #:use-module (gnu packages curl)
45 #:use-module (gnu packages cyrus-sasl)
46 #:use-module (gnu packages disk)
47 #:use-module (gnu packages dns)
48 #:use-module (gnu packages docbook)
49 #:use-module (gnu packages documentation)
50 #:use-module (gnu packages figlet)
51 #:use-module (gnu packages firmware)
52 #:use-module (gnu packages flex)
53 #:use-module (gnu packages fontutils)
54 #:use-module (gnu packages freedesktop)
55 #:use-module (gnu packages gettext)
56 #:use-module (gnu packages gl)
57 #:use-module (gnu packages glib)
58 #:use-module (gnu packages gnome)
59 #:use-module (gnu packages gnupg)
60 #:use-module (gnu packages golang)
61 #:use-module (gnu packages gtk)
62 #:use-module (gnu packages image)
63 #:use-module (gnu packages libbsd)
64 #:use-module (gnu packages libusb)
65 #:use-module (gnu packages linux)
66 #:use-module (gnu packages ncurses)
67 #:use-module (gnu packages nettle)
68 #:use-module (gnu packages networking)
69 #:use-module (gnu packages onc-rpc)
70 #:use-module (gnu packages package-management)
71 #:use-module (gnu packages perl)
72 #:use-module (gnu packages pkg-config)
73 #:use-module (gnu packages polkit)
74 #:use-module (gnu packages protobuf)
75 #:use-module (gnu packages python)
76 #:use-module (gnu packages python-web)
77 #:use-module (gnu packages python-xyz)
78 #:use-module (gnu packages pulseaudio)
79 #:use-module (gnu packages selinux)
80 #:use-module (gnu packages sdl)
81 #:use-module (gnu packages sphinx)
82 #:use-module (gnu packages spice)
83 #:use-module (gnu packages texinfo)
84 #:use-module (gnu packages textutils)
85 #:use-module (gnu packages tls)
86 #:use-module (gnu packages web)
87 #:use-module (gnu packages wget)
88 #:use-module (gnu packages xdisorg)
89 #:use-module (gnu packages xml)
90 #:use-module (gnu packages xorg)
91 #:use-module (guix build-system cmake)
92 #:use-module (guix build-system gnu)
93 #:use-module (guix build-system go)
94 #:use-module (guix build-system meson)
95 #:use-module (guix build-system python)
96 #:use-module (guix build-system trivial)
97 #:use-module (guix download)
98 #:use-module (guix git-download)
99 #:use-module ((guix licenses) #:prefix license:)
100 #:use-module (guix packages)
101 #:use-module (guix utils)
102 #:use-module (srfi srfi-1))
104 (define (qemu-patch commit file-name sha256)
105 "Return an origin for COMMIT."
109 "http://git.qemu.org/?p=qemu.git;a=commitdiff_plain;h="
112 (file-name file-name)))
120 (uri (string-append "https://download.qemu.org/qemu-"
122 (patches (search-patches "qemu-CVE-2020-1711.patch"
123 "qemu-CVE-2020-7039.patch"
124 "qemu-CVE-2020-7211.patch"
125 "qemu-CVE-2020-8608.patch"
126 "qemu-fix-documentation-build-failure.patch"))
129 "1w38hzlw7xp05gcq1nhga7hxvndxy6dfcnzi7q2il8ff110isj6k"))))
130 (build-system gnu-build-system)
132 `(;; Running tests in parallel can occasionally lead to failures, like:
133 ;; boot_sector_test: assertion failed (signature == SIGNATURE): (0x00000000 == 0x0000dead)
136 ;; FIXME: Disable tests on i686 to work around
137 ;; <https://bugs.gnu.org/40527>.
138 #:tests? ,(or (%current-target-system)
139 (not (string=? "i686-linux" (%current-system))))
141 #:configure-flags (list "--enable-usb-redir" "--enable-opengl"
143 (string-append "--smbd="
144 (assoc-ref %outputs "out")
145 "/libexec/samba-wrapper")
146 "--audio-drv-list=alsa,pa,sdl")
147 ;; Make build and test output verbose to facilitate investigation upon failure.
148 #:make-flags '("V=1")
150 (modify-phases %standard-phases
152 (lambda* (#:key inputs outputs (configure-flags '())
154 ;; The `configure' script doesn't understand some of the
155 ;; GNU options. Thus, add a new phase that's compatible.
156 (let ((out (assoc-ref outputs "out")))
157 (setenv "SHELL" (which "bash"))
159 ;; While we're at it, patch for tests.
160 (substitute* "tests/libqtest.c"
161 (("/bin/sh") (which "sh")))
163 ;; The binaries need to be linked against -lrt.
164 (setenv "LDFLAGS" "-lrt")
167 ,(string-append "--cc=" (which "gcc"))
168 ;; Some architectures insist on using HOST_CC
169 ,(string-append "--host-cc=" (which "gcc"))
170 "--disable-debug-info" ; save build space
171 "--enable-virtfs" ; just to be sure
172 ,(string-append "--prefix=" out)
173 ,(string-append "--sysconfdir=/etc")
174 ,@configure-flags)))))
175 (add-after 'install 'install-info
176 (lambda* (#:key inputs outputs #:allow-other-keys)
177 ;; Install the Info manual, unless Texinfo is missing.
178 (when (assoc-ref inputs "texinfo")
179 (let* ((out (assoc-ref outputs "out"))
180 (dir (string-append out "/share/info")))
181 (invoke "make" "info")
182 (for-each (lambda (info)
183 (install-file info dir))
184 (find-files "." "\\.info"))))
186 ;; Create a wrapper for Samba. This allows QEMU to use Samba without
187 ;; pulling it in as an input. Note that you need to explicitly install
188 ;; Samba in your Guix profile for Samba support.
189 (add-after 'install-info 'create-samba-wrapper
190 (lambda* (#:key inputs outputs #:allow-other-keys)
191 (let* ((out (assoc-ref %outputs "out"))
192 (libexec (string-append out "/libexec")))
193 (call-with-output-file "samba-wrapper"
195 (format port "#!/bin/sh
197 (chmod "samba-wrapper" #o755)
198 (install-file "samba-wrapper" libexec))
200 (add-before 'configure 'prevent-network-configuration
202 ;; Prevent the build from trying to use git to fetch from the net.
203 (substitute* "Makefile"
204 (("@./config.status")
206 (add-before 'check 'disable-unusable-tests
207 (lambda* (#:key inputs outputs #:allow-other-keys)
208 (substitute* "tests/Makefile.include"
209 ;; Comment out the test-qga test, which needs /sys and
210 ;; fails within the build environment.
211 (("check-unit-.* tests/test-qga" all)
212 (string-append "# " all)))
213 (substitute* "tests/Makefile.include"
214 ;; Comment out the test-char test, which needs networking and
215 ;; fails within the build environment.
216 (("check-unit-.* tests/test-char" all)
217 (string-append "# " all)))
219 (inputs ; TODO: Add optional inputs.
220 `(("alsa-lib" ,alsa-lib)
226 ("libcacard" ,libcacard) ; smartcard support
227 ("libcap" ,libcap) ; virtfs support requires libcap & libattr
229 ("libepoxy" ,libepoxy)
230 ("libjpeg" ,libjpeg-turbo)
232 ("libseccomp" ,libseccomp)
233 ("libusb" ,libusb) ;USB pass-through support
236 ;; ("pciutils" ,pciutils)
238 ("pulseaudio" ,pulseaudio)
241 ("usbredir" ,usbredir)
242 ("util-linux" ,util-linux)
244 ("virglrenderer" ,virglrenderer)
246 (native-inputs `(("gettext" ,gettext-minimal)
247 ("glib:bin" ,glib "bin") ; gtester, etc.
251 ("pkg-config" ,pkg-config)
252 ("python-wrapper" ,python-wrapper)
253 ("python-sphinx" ,python-sphinx)
254 ("texinfo" ,texinfo)))
255 (home-page "https://www.qemu.org")
256 (synopsis "Machine emulator and virtualizer")
258 "QEMU is a generic machine emulator and virtualizer.
260 When used as a machine emulator, QEMU can run OSes and programs made for one
261 machine (e.g. an ARM board) on a different machine---e.g., your own PC. By
262 using dynamic translation, it achieves very good performance.
264 When used as a virtualizer, QEMU achieves near native performances by
265 executing the guest code directly on the host CPU. QEMU supports
266 virtualization when executing under the Xen hypervisor or using
267 the KVM kernel module in Linux. When using KVM, QEMU can virtualize x86,
268 server and embedded PowerPC, and S390 guests.")
270 ;; Many files are GPLv2+, but some are GPLv2-only---e.g., `memory.c'.
271 (license license:gpl2)
273 ;; Several tests fail on MIPS; see <http://hydra.gnu.org/build/117914>.
274 (supported-systems (delete "mips64el-linux" %supported-systems))))
276 (define-public qemu-minimal
277 ;; QEMU without GUI support.
278 (package (inherit qemu)
279 (name "qemu-minimal")
280 (synopsis "Machine emulator and virtualizer (without GUI)")
282 (substitute-keyword-arguments (package-arguments qemu)
283 ((#:configure-flags _ '(list))
284 ;; Restrict to the targets supported by Guix.
285 ''("--target-list=i386-softmmu,x86_64-softmmu,mips64el-softmmu,arm-softmmu,aarch64-softmmu"))))
287 ;; Remove dependencies on optional libraries, notably GUI libraries.
288 (native-inputs (fold alist-delete (package-native-inputs qemu)
290 (inputs (fold alist-delete (package-inputs qemu)
291 '("libusb" "mesa" "sdl2" "spice" "virglrenderer" "gtk+"
292 "usbredir" "libdrm" "libepoxy" "pulseaudio" "vde2"
295 (define-public libosinfo
302 (uri (string-append "https://releases.pagure.org/libosinfo/libosinfo-"
306 "1s97sv24bybggjx6hgqba2qdqz3ivfpd4cmkh4zm5y59sim109mv"))))
307 (build-system meson-build-system)
310 (list (string-append "-Dwith-usb-ids-path="
311 (assoc-ref %build-inputs "usb.ids"))
312 (string-append "-Dwith-pci-ids-path="
313 (assoc-ref %build-inputs "pci.ids")))
315 (modify-phases %standard-phases
316 (add-after 'unpack 'patch-osinfo-path
317 (lambda* (#:key inputs #:allow-other-keys)
318 (substitute* "osinfo/osinfo_loader.c"
319 (("path = DATA_DIR.*")
320 (string-append "path = \"" (assoc-ref inputs "osinfo-db")
321 "/share/osinfo\";")))
324 `(("libsoup" ,libsoup)
327 ("osinfo-db" ,osinfo-db)))
329 `(("glib" ,glib "bin") ; glib-mkenums, etc.
330 ("gobject-introspection" ,gobject-introspection)
333 ("intltool" ,intltool)
334 ("pkg-config" ,pkg-config)
338 (uri "https://github.com/pciutils/pciids/raw/ad02084f0bc143e3c15e31a6152a3dfb1d7a3156/pci.ids")
341 "0kfhpj5rnh24hz2714qhfmxk281vwc2w50sm73ggw5d15af7zfsw"))))
345 (uri "https://svn.code.sf.net/p/linux-usb/repo/trunk/htdocs/usb.ids?r=2681")
346 (file-name "usb.ids")
349 "1m6yhvz5k8aqzxgk7xj3jkk8frl1hbv0h3vgj4wbnvnx79qnvz3r"))))))
350 (home-page "https://libosinfo.org/")
351 (synopsis "Operating system information database")
352 (description "libosinfo is a GObject based library API for managing
353 information about operating systems, hypervisors and the (virtual) hardware
354 devices they can support. It includes a database containing device metadata
355 and provides APIs to match/identify optimal devices for deploying an operating
356 system on a hypervisor. Via GObject Introspection, the API is available in
357 all common programming languages. Vala bindings are also provided.")
358 ;; The library files are released under LGPLv2.1 or later; the source
359 ;; files in the "tools" directory are released under GPLv2+.
360 (license (list license:lgpl2.1+ license:gpl2+))))
369 "https://linuxcontainers.org/downloads/lxc/lxc-"
373 "1igxqgx8q9cp15mcp1y8j564bl85ijw04jcmgb1s5bmfbg1751sd"))))
374 (build-system gnu-build-system)
376 `(("pkg-config" ,pkg-config)))
380 ("libseccomp" ,libseccomp)
381 ("libselinux" ,libselinux)))
384 (list (string-append "--docdir=" (assoc-ref %outputs "out")
385 "/share/doc/" ,name "-" ,version)
387 "--localstatedir=/var")
389 ;; Treat the kernel headers as system headers to silence
390 ;; compiler warnings from those.
391 (list (string-append "C_INCLUDE_PATH="
392 (assoc-ref %build-inputs "kernel-headers")
395 (modify-phases %standard-phases
397 (lambda* (#:key outputs #:allow-other-keys)
398 (let* ((out (assoc-ref outputs "out"))
399 (bashcompdir (string-append out "/etc/bash_completion.d")))
400 (invoke "make" "install"
401 (string-append "bashcompdir=" bashcompdir)
402 ;; Don't install files into /var and /etc.
403 "LXCPATH=/tmp/var/lib/lxc"
404 "localstatedir=/tmp/var"
405 "sysconfdir=/tmp/etc"
406 "sysconfigdir=/tmp/etc/default")))))))
407 (synopsis "Linux container tools")
408 (home-page "https://linuxcontainers.org/")
410 "LXC is a userspace interface for the Linux kernel containment features.
411 Through a powerful API and simple tools, it lets Linux users easily create and
412 manage system or application containers.")
413 (license license:lgpl2.1+)))
415 (define-public libvirt
422 (uri (string-append "https://libvirt.org/sources/libvirt-"
425 (base32 "0m8cqaqflvys5kaqpvb0qr4k365j09jc5xk6x70yvg8qkcl2hcz2"))
427 (search-patches "libvirt-create-machine-cgroup.patch"))))
428 (build-system gnu-build-system)
432 "--with-qemu-user=nobody"
433 "--with-qemu-group=kvm"
435 (string-append "--docdir=" (assoc-ref %outputs "out") "/share/doc/"
438 "--localstatedir=/var")
440 (modify-phases %standard-phases
441 (add-before 'configure 'fix-BOURNE_SHELL-definition
442 ;; BOURNE_SHELL is hard-#defined to ‘/bin/sh’, causing test failures.
444 (substitute* "config.h.in"
445 (("/bin/sh") (which "sh")))
447 (add-before 'configure 'patch-libtirpc-file-names
448 (lambda* (#:key inputs #:allow-other-keys)
449 ;; libvirt uses an m4 macro instead of pkg-config to determine where
450 ;; the RPC headers are located. Tell it to look in the right place.
451 (substitute* "configure"
452 (("/usr/include/tirpc") ;defined in m4/virt-xdr.m4
453 (string-append (assoc-ref inputs "libtirpc")
456 (add-before 'configure 'disable-broken-tests
458 (let ((tests (list "commandtest" ; hangs idly
459 "qemuxml2argvtest" ; fails
460 "qemuhotplugtest" ; fails
461 "virnetsockettest" ; tries to network
462 "virshtest"))) ; fails
463 (substitute* "tests/Makefile.in"
464 (((format #f "(~a)\\$\\(EXEEXT\\)" (string-join tests "|")))
468 ;; Since the sysconfdir and localstatedir should be /etc and /var
469 ;; at runtime, we must prevent writing to them at installation
471 (lambda* (#:key make-flags #:allow-other-keys)
472 (apply invoke "make" "install"
473 "sysconfdir=/tmp/etc"
474 "localstatedir=/tmp/var"
477 `(("libxml2" ,libxml2)
479 ("libpciaccess" ,libpciaccess)
484 ("libtirpc" ,libtirpc) ;for <rpc/rpc.h>
485 ("libuuid" ,util-linux)
486 ("lvm2" ,lvm2) ;for libdevmapper
489 ("cyrus-sasl" ,cyrus-sasl)
492 ("dmidecode" ,dmidecode)
494 ("ebtables" ,ebtables)
496 ("iptables" ,iptables)))
498 `(("xsltproc" ,libxslt)
500 ("pkg-config" ,pkg-config)
502 ("python" ,python-wrapper)))
503 (home-page "https://libvirt.org")
504 (synopsis "Simple API for virtualization")
505 (description "Libvirt is a C toolkit to interact with the virtualization
506 capabilities of recent versions of Linux. The library aims at providing long
507 term stable C API initially for the Xen paravirtualization but should be able
508 to integrate other virtualization mechanisms if needed.")
509 (license license:lgpl2.1+)))
511 (define-public libvirt-glib
513 (name "libvirt-glib")
517 (uri (string-append "ftp://libvirt.org/libvirt/glib/"
518 "libvirt-glib-" version ".tar.gz"))
521 "1zpbv4ninc57c9rw4zmmkvvqn7154iv1qfr20kyxn8xplalqrzvz"))))
522 (build-system gnu-build-system)
524 `(("openssl" ,openssl)
525 ("cyrus-sasl" ,cyrus-sasl)
526 ("lvm2" ,lvm2) ; for libdevmapper
527 ("libyajl" ,libyajl)))
529 `(("pkg-config" ,pkg-config)
530 ("intltool" ,intltool)
534 ;; ‘Required:’ by the installed .pc files.
538 ("gobject-introspection" ,gobject-introspection)))
539 (home-page "https://libvirt.org")
540 (synopsis "GLib wrapper around libvirt")
541 (description "libvirt-glib wraps the libvirt library to provide a
542 high-level object-oriented API better suited for glib-based applications, via
546 @item libvirt-glib - GLib main loop integration & misc helper APIs
547 @item libvirt-gconfig - GObjects for manipulating libvirt XML documents
548 @item libvirt-gobject - GObjects for managing libvirt objects
551 (license license:lgpl2.1+)))
553 (define-public python-libvirt
555 (name "python-libvirt")
560 (uri (string-append "https://libvirt.org/sources/python/libvirt-python-"
563 (base32 "0kyz3lx49d8p75mvbzinxc1zgs8g7adn77y9bm15b8b4ad9zl5s6"))))
564 (build-system python-build-system)
567 (modify-phases %standard-phases
568 (add-after 'unpack 'patch-nosetests-path
569 (lambda* (#:key inputs #:allow-other-keys)
570 (substitute* "setup.py"
571 (("\"/usr/bin/nosetests\"")
572 (string-append "\"" (which "nosetests") "\""))
573 (("self\\.spawn\\(\\[sys\\.executable, nose\\]\\)")
574 (format #f "self.spawn([\"~a\", nose])" (which "bash"))))
577 `(("libvirt" ,libvirt)))
579 `(("python-lxml" ,python-lxml)))
581 `(("pkg-config" ,pkg-config)
582 ("python-nose" ,python-nose)))
583 (home-page "https://libvirt.org")
584 (synopsis "Python bindings to libvirt")
585 (description "This package provides Python bindings to the libvirt
586 virtualization library.")
587 (license license:lgpl2.1+)))
589 (define-public python2-libvirt
590 (package-with-python2 python-libvirt))
592 (define-public virt-manager
594 (name "virt-manager")
598 (uri (string-append "https://virt-manager.org/download/sources"
599 "/virt-manager/virt-manager-"
603 "06ws0agxlip6p6n3n43knsnjyd91gqhh2dadgc33wl9lx1k8vn6g"))))
604 (build-system python-build-system)
606 `(#:use-setuptools? #f ; uses custom distutils 'install' command
607 ;; Some of the tests seem to require network access to install virtual
610 #:imported-modules ((guix build glib-or-gtk-build-system)
611 ,@%python-build-system-modules)
612 #:modules ((ice-9 match)
614 (guix build python-build-system)
615 ((guix build glib-or-gtk-build-system) #:prefix glib-or-gtk:)
618 (modify-phases %standard-phases
619 (add-after 'unpack 'fix-setup
620 (lambda* (#:key outputs #:allow-other-keys)
621 (substitute* "virtinst/buildconfig.py"
622 (("/usr") (assoc-ref outputs "out")))
624 (add-after 'unpack 'fix-qemu-img-reference
625 (lambda* (#:key inputs #:allow-other-keys)
626 (substitute* "virtconv/formats.py"
627 (("/usr(/bin/qemu-img)" _ suffix)
628 (string-append (assoc-ref inputs "qemu") suffix)))
630 (add-after 'unpack 'fix-default-uri
631 (lambda* (#:key inputs #:allow-other-keys)
632 ;; Xen is not available for now - so only patch qemu.
633 (substitute* "virtManager/createconn.py"
634 (("/usr(/bin/qemu-system)" _ suffix)
635 (string-append (assoc-ref inputs "qemu") suffix)))
637 (add-before 'wrap 'wrap-with-GI_TYPELIB_PATH
638 (lambda* (#:key inputs outputs #:allow-other-keys)
639 (let* ((bin (string-append (assoc-ref outputs "out") "/bin"))
640 (bin-files (find-files bin ".*"))
641 (paths (map (match-lambda
642 ((output . directory)
643 (let* ((girepodir (string-append
645 "/lib/girepository-1.0")))
646 (if (file-exists? girepodir)
649 (for-each (lambda (file)
650 (format #t "wrapping ~a\n" file)
652 `("GI_TYPELIB_PATH" ":" prefix
653 ,(filter identity paths))))
656 (add-after 'install 'glib-or-gtk-compile-schemas
657 (assoc-ref glib-or-gtk:%standard-phases 'glib-or-gtk-compile-schemas))
658 (add-after 'install 'glib-or-gtk-wrap
659 (assoc-ref glib-or-gtk:%standard-phases 'glib-or-gtk-wrap)))))
664 ("gtksourceview" ,gtksourceview)
666 ("libvirt-glib" ,libvirt-glib)
667 ("libosinfo" ,libosinfo)
669 ("python-libvirt" ,python-libvirt)
670 ("python-requests" ,python-requests)
671 ("python-ipaddress" ,python-ipaddress)
672 ("python-pycairo" ,python-pycairo)
673 ("python-pygobject" ,python-pygobject)
674 ("python-libxml2" ,python-libxml2)
675 ("spice-gtk" ,spice-gtk)))
676 ;; virt-manager searches for qemu-img or kvm-img in the PATH.
680 `(("glib" ,glib "bin") ; glib-compile-schemas
681 ("gobject-introspection" ,gobject-introspection)
682 ("gtk+" ,gtk+ "bin") ; gtk-update-icon-cache
683 ("perl" ,perl) ; pod2man
684 ("intltool" ,intltool)))
685 (home-page "https://virt-manager.org/")
686 (synopsis "Manage virtual machines")
688 "The virt-manager application is a desktop user interface for managing
689 virtual machines through libvirt. It primarily targets KVM VMs, but also
690 manages Xen and LXC (Linux containers). It presents a summary view of running
691 domains, their live performance and resource utilization statistics.")
692 (license license:gpl2+)))
700 (uri (string-append "http://download.openvz.org/criu/criu-"
704 "1yn9ix9lqvqvjrs3a3g6g1wqfniyf9n7giy0mr3jvijmrcm7y0pa"))))
705 (build-system gnu-build-system)
707 `(#:test-target "test"
708 #:tests? #f ; tests require mounting as root
710 (list (string-append "PREFIX=" (assoc-ref %outputs "out"))
711 (string-append "LIBDIR=" (assoc-ref %outputs "out")
713 (string-append "ASCIIDOC=" (assoc-ref %build-inputs "asciidoc")
715 (string-append "XMLTO=" (assoc-ref %build-inputs "xmlto")
718 (modify-phases %standard-phases
720 (lambda* (#:key inputs #:allow-other-keys)
721 ;; The includes for libnl are located in a sub-directory.
722 (setenv "C_INCLUDE_PATH"
723 (string-append (assoc-ref inputs "libnl")
725 ;; Also add the kernel headers here so that GCC
726 ;; treats them as "system headers". Otherwise
727 ;; the build fails with -Werror because parasite.c
728 ;; includes both <linux/fs.h> and <sys/mount.h>,
729 ;; which define some of the same constants.
730 (assoc-ref inputs "kernel-headers")
733 (add-after 'configure 'fix-documentation
734 (lambda* (#:key inputs outputs #:allow-other-keys)
735 (substitute* "Documentation/Makefile"
738 "-m custom.xsl --skip-validation -x "
739 (assoc-ref inputs "docbook-xsl") "/xml/xsl/"
740 ,(package-name docbook-xsl) "-"
741 ,(package-version docbook-xsl)
742 "/manpages/docbook.xsl")))
744 (add-after 'unpack 'hardcode-variables
745 (lambda* (#:key inputs #:allow-other-keys)
746 ;; Hardcode arm version detection
747 (substitute* "Makefile"
748 (("ARMV.*:=.*") "ARMV := 7\n"))
749 ;; We are currently using python-2
750 (substitute* "crit/Makefile"
751 (("\\$\\(PYTHON\\)") "python2"))
752 (substitute* "lib/Makefile"
754 (string-append (assoc-ref inputs "python")
757 (add-before 'build 'fix-symlink
758 (lambda* (#:key inputs #:allow-other-keys)
759 ;; The file 'images/google/protobuf/descriptor.proto' points to
760 ;; /usr/include/..., which obviously does not exist.
761 (let* ((file "google/protobuf/descriptor.proto")
762 (target (string-append "images/" file))
763 (source (string-append (assoc-ref inputs "protobuf")
766 (symlink source target)
768 (add-after 'install 'wrap
769 (lambda* (#:key inputs outputs #:allow-other-keys)
770 ;; Make sure 'crit' runs with the correct PYTHONPATH.
771 (let* ((out (assoc-ref outputs "out"))
772 (path (string-append out
774 (string-take (string-take-right
775 (assoc-ref inputs "python") 5) 3)
777 (getenv "PYTHONPATH"))))
778 (wrap-program (string-append out "/bin/crit")
779 `("PYTHONPATH" ":" prefix (,path))))
782 `(("protobuf" ,protobuf)
784 ("python2-protobuf" ,python2-protobuf)
785 ("python2-ipaddr" ,python2-ipaddr)
793 `(("pkg-config" ,pkg-config)
795 ("protobuf-c" ,protobuf-c)
796 ("asciidoc" ,asciidoc)
798 ("docbook-xml" ,docbook-xml)
799 ("docbook-xsl" ,docbook-xsl)))
800 (home-page "https://criu.org")
801 (synopsis "Checkpoint and restore in user space")
802 (description "Using this tool, you can freeze a running application (or
803 part of it) and checkpoint it to a hard drive as a collection of files. You
804 can then use the files to restore and run the application from the point it
805 was frozen at. The distinctive feature of the CRIU project is that it is
806 mainly implemented in user space.")
807 ;; The project is licensed under GPLv2; files in the lib/ directory are
809 (license (list license:gpl2 license:lgpl2.1))))
811 (define-public qmpbackup
818 (url "https://github.com/abbbi/qmpbackup.git")
820 (file-name (git-file-name name version))
823 "0swhp5byz44brhyis1a39p11fyn9q84xz5q6v2fah29r7d71kmmx"))))
824 (build-system python-build-system)
826 `(#:python ,python-2))
827 (home-page "https://github.com/abbbi/qmpbackup")
828 (synopsis "Backup and restore QEMU machines")
829 (description "qmpbackup is designed to create and restore full and
830 incremental backups of running QEMU virtual machines via QMP, the QEMU
832 (license license:gpl3+)))
834 (define-public looking-glass-client
835 (let ((commit "182c4752d57690da7f99d5e788de9b8baea33895"))
837 (name "looking-glass-client")
838 (version (string-append "a12-" (string-take commit 7)))
842 (uri (git-reference (url "https://github.com/gnif/LookingGlass")
844 (file-name (git-file-name name version))
847 "02bq46ndmzq9cihazzn7xq1x7q5nzm7iw4l9lqzihxcxp9famkhw"))
848 (modules '((guix build utils)))
851 ;; Do not create binaries optimized for the CPU of the build machine,
852 ;; for reproducibility and compatibility. TODO: in the next version
853 ;; of looking glass, this is exposed as a CMake configure option.
854 (substitute* "client/CMakeLists.txt"
858 (build-system cmake-build-system)
859 (inputs `(("fontconfig" ,fontconfig)
864 ("sdl2-ttf" ,sdl2-ttf)
865 ("spice-protocol" ,spice-protocol)
866 ("wayland" ,wayland)))
867 (native-inputs `(("libconfig" ,libconfig)
869 ("pkg-config" ,pkg-config)))
871 `(#:tests? #f ;; No tests are available.
872 #:make-flags '("CC=gcc")
873 #:phases (modify-phases %standard-phases
874 (add-before 'configure 'chdir-to-client
875 (lambda* (#:key outputs #:allow-other-keys)
878 (add-after 'chdir-to-client 'add-missing-include
880 ;; Mimic upstream commit b9797529893, required since the
881 ;; update to Mesa 19.2.
882 (substitute* "renderers/egl/shader.h"
883 (("#include <stdbool\\.h>")
884 "#include <stdbool.h>\n#include <stddef.h>"))
887 (lambda* (#:key outputs #:allow-other-keys)
888 (install-file "looking-glass-client"
889 (string-append (assoc-ref outputs "out")
892 (home-page "https://looking-glass.hostfission.com")
893 (synopsis "KVM Frame Relay (KVMFR) implementation")
894 (description "Looking Glass allows the use of a KVM (Kernel-based Virtual
895 Machine) configured for VGA PCI Pass-through without an attached physical
896 monitor, keyboard or mouse. It displays the VM's rendered contents on your main
898 ;; This package requires SSE instructions.
899 (supported-systems '("i686-linux" "x86_64-linux"))
900 (license license:gpl2+))))
905 (version "1.0.0-rc6")
909 "https://github.com/opencontainers/runc/releases/"
910 "download/v" version "/runc.tar.xz"))
911 (file-name (string-append name "-" version ".tar.xz"))
912 (patches (search-patches "runc-CVE-2019-5736.patch"))
915 "1c7832dq70slkjh8qp2civ1wxhhdd2hrx84pq7db1mmqc9fdr3cc"))))
916 (build-system go-build-system)
918 '(#:import-path "github.com/opencontainers/runc"
920 ;; XXX: 20/139 tests fail due to missing /var, cgroups and apparmor in
921 ;; the build environment.
924 (modify-phases %standard-phases
926 (lambda* (#:key source import-path #:allow-other-keys)
927 ;; Unpack the tarball into 'runc' instead of 'runc-1.0.0-rc5'.
928 (let ((dest (string-append "src/" import-path)))
930 (invoke "tar" "-C" (string-append "src/" import-path)
931 "--strip-components=1"
934 (lambda* (#:key import-path #:allow-other-keys)
935 (chdir (string-append "src/" import-path))
936 ;; XXX: requires 'go-md2man'.
937 ;; (invoke "make" "man")
941 ;; (invoke "make" "localunittest")))
943 (lambda* (#:key outputs #:allow-other-keys)
944 (let ((out (assoc-ref outputs "out")))
945 (invoke "make" "install" "install-bash"
946 (string-append "PREFIX=" out))))))))
948 `(("pkg-config" ,pkg-config)))
950 `(("libseccomp" ,libseccomp)))
951 (synopsis "Open container initiative runtime")
952 (home-page "https://www.opencontainers.org/")
954 "@command{runc} is a command line client for running applications
955 packaged according to the
956 @uref{https://github.com/opencontainers/runtime-spec/blob/master/spec.md, Open
957 Container Initiative (OCI) format} and is a compliant implementation of the
958 Open Container Initiative specification.")
959 (license license:asl2.0)))
968 "https://github.com/openSUSE/umoci/releases/download/v"
969 version "/umoci.tar.xz"))
970 (file-name (string-append "umoci-" version ".tar.xz"))
973 "0x1yyvpllz6fyy9xip6f7b6c94v984n3faf8p50fr9y4ygkgi15a"))))
974 (build-system go-build-system)
976 '(#:import-path "github.com/openSUSE/umoci"
979 (modify-phases %standard-phases
981 (lambda* (#:key source import-path #:allow-other-keys)
982 ;; Unpack the tarball into 'umoci' instead of "runc-${version}".
983 (let ((dest (string-append "src/" import-path)))
985 (invoke "tar" "-C" (string-append "src/" import-path)
986 "--strip-components=1"
989 (lambda* (#:key import-path #:allow-other-keys)
990 (chdir (string-append "src/" import-path))
991 ;; TODO: build manpages with 'go-md2man'.
992 (invoke "make" "SHELL=bash")))
994 (lambda* (#:key outputs #:allow-other-keys)
995 (let* ((out (assoc-ref outputs "out"))
996 (bindir (string-append out "/bin")))
997 (install-file "umoci" bindir)
999 (home-page "https://umo.ci/")
1000 (synopsis "Tool for modifying Open Container images")
1002 "@command{umoci} is a tool that allows for high-level modification of an
1003 Open Container Initiative (OCI) image layout and its tagged images.")
1004 (license license:asl2.0)))
1006 (define-public skopeo
1013 (url "https://github.com/projectatomic/skopeo")
1014 (commit (string-append "v" version))))
1015 (file-name (git-file-name name version))
1018 "1bagirzdzjhicn5dr691092ac3q6lhz3xngjzgqiqkxnvpz7p6cn"))))
1019 (build-system go-build-system)
1021 `(("pkg-config" ,pkg-config)))
1023 `(("btrfs-progs" ,btrfs-progs)
1025 ("libassuan" ,libassuan)
1026 ("libselinux" ,libselinux)
1027 ("libostree" ,libostree)
1032 '(#:import-path "github.com/projectatomic/skopeo"
1033 #:install-source? #f
1034 #:tests? #f ; The tests require Docker
1036 (modify-phases %standard-phases
1038 (lambda* (#:key import-path #:allow-other-keys)
1039 (chdir (string-append "src/" import-path))
1040 ;; TODO: build manpages with 'go-md2man'.
1041 (invoke "make" "binary-local")))
1043 (lambda* (#:key outputs #:allow-other-keys)
1044 (let ((out (assoc-ref outputs "out")))
1045 (invoke "make" "install-binary" "install-completions"
1046 (string-append "PREFIX=" out))))))))
1047 (home-page "https://github.com/projectatomic/skopeo")
1048 (synopsis "Interact with container images and container image registries")
1050 "@command{skopeo} is a command line utility providing various operations
1051 with container images and container image registries. It can:
1054 @item Copy container images between various containers image stores,
1055 converting them as necessary.
1057 @item Convert a Docker schema 2 or schema 1 container image to an OCI image.
1059 @item Inspect a repository on a container registry without needlessly pulling
1062 @item Sign and verify container images.
1064 @item Delete container images from a remote container registry.
1067 (license license:asl2.0)))
1069 (define-public python-vagrant
1071 (name "python-vagrant")
1076 (uri (pypi-uri "python-vagrant" version))
1079 "1ikrh6canhcxg5y7pzmkcnnydikppv7s6sm9prfx90nk0ac8m6mg"))))
1080 (build-system python-build-system)
1082 '(#:tests? #f)) ; tests involve running vagrant.
1083 (home-page "https://github.com/todddeluca/python-vagrant")
1084 (synopsis "Python bindings for Vagrant")
1086 "Python-vagrant is a Python module that provides a thin wrapper around the
1087 @code{vagrant} command line executable, allowing programmatic control of Vagrant
1089 (license license:expat)))
1091 (define-public bubblewrap
1097 (uri (string-append "https://github.com/containers/bubblewrap/"
1098 "releases/download/v" version "/bubblewrap-"
1102 "00ycgi6q2yngh06bnz50wkvar6r2jnjf3j158grhi9k13jdrpimr"))))
1103 (build-system gnu-build-system)
1106 (modify-phases %standard-phases
1107 (add-after 'unpack 'fix-test
1108 (lambda* (#:key outputs #:allow-other-keys)
1109 ;; Tests try to access /var/tmp, which is not possible in our build
1110 ;; environment. Let's give them another directory.
1111 ;; /tmp gets overriden in some tests, so we need another directory.
1112 ;; the only possibility is the output directory.
1113 (let ((tmp-dir (string-append (assoc-ref outputs "out") "/tmp")))
1115 (substitute* "tests/test-run.sh"
1116 (("/var/tmp") tmp-dir)
1117 ;; Tests create a temporary python script, so fix its shebang.
1118 (("/usr/bin/env python") (which "python"))
1119 ;; Some tests try to access /usr, but that doesn't exist.
1120 ;; Give them /gnu instead.
1122 (("--ro-bind /bin /bin") "--ro-bind /gnu /bin")
1123 (("--ro-bind /sbin /sbin") "--ro-bind /gnu /sbin")
1124 (("--ro-bind /lib /lib") "--ro-bind /gnu /lib")
1125 ((" */bin/bash") (which "bash"))
1126 (("/bin/sh") (which "sh"))
1127 (("findmnt") (which "findmnt"))))
1129 ;; Remove the directory we gave to tests to have a clean package.
1130 (add-after 'check 'remove-tmp-dir
1131 (lambda* (#:key outputs #:allow-other-keys)
1132 (delete-file-recursively (string-append (assoc-ref outputs "out") "/tmp"))
1135 `(("libcap" ,libcap)))
1137 `(("python-2" ,python-2)
1138 ("util-linux" ,util-linux)))
1139 (home-page "https://github.com/containers/bubblewrap")
1140 (synopsis "Unprivileged sandboxing tool")
1141 (description "Bubblewrap is aimed at running applications in a sandbox,
1142 restricting their access to parts of the operating system or user data such as
1143 the home directory. Bubblewrap always creates a new mount namespace, and the
1144 user can specify exactly what parts of the file system should be made visible
1145 in the sandbox. These directories are mounted with the @code{nodev} option
1146 by default and can be made read-only.")
1147 (license license:lgpl2.0+)))
1149 (define-public bochs
1156 (uri (string-append "https://sourceforge.net/projects/bochs/files/bochs/"
1157 version "/bochs-" version ".tar.gz"))
1159 (base32 "0ql8q6y1k356li1g9gbvl21448mlxphxxi6kjb2b3pxvzd0pp2b3"))))
1160 (build-system gnu-build-system)
1162 `(#:tests? #f)) ; no tests exist
1164 `(("libxrandr" ,libxrandr)))
1165 (home-page "http://bochs.sourceforge.net/")
1166 (synopsis "Emulator for x86 PC")
1168 "Bochs is an emulator which can emulate Intel x86 CPU, common I/O
1169 devices, and a custom BIOS. It can also be compiled to emulate many different
1170 x86 CPUs, from early 386 to the most recent x86-64 Intel and AMD processors.
1171 Bochs can run most Operating Systems inside the emulation including Linux,
1172 DOS or Microsoft Windows.")
1173 (license license:lgpl2.0+)))
1182 (url "git://xenbits.xenproject.org/xen.git")
1183 (commit (string-append "RELEASE-" version))))
1184 (file-name (git-file-name name version))
1187 "0py50n995gv909i0d1lfdcj9wcp5g1d5z6m2291jqqlfyany138g"))))
1188 (build-system gnu-build-system)
1191 (list "--enable-rpath"
1192 "--disable-qemu-traditional" ; It tries to do "git clone"
1193 "--disable-rombios" ; would try to "git clone" via etherboot.
1194 ;; TODO: Re-enable stubdom (it's "more secure" to use it).
1195 "--disable-stubdom" ; tries to "git clone" old patched newlib.
1196 (string-append "--with-initddir="
1197 (assoc-ref %outputs "out")
1199 (string-append "--with-system-qemu="
1200 (assoc-ref %build-inputs "qemu")
1201 "/bin/qemu-system-i386")
1202 (string-append "--with-system-seabios="
1203 (assoc-ref %build-inputs "seabios")
1204 "/share/firmware/bios.bin")
1205 (string-append "--with-system-ovmf="
1206 (assoc-ref %build-inputs "ovmf")
1207 "/share/firmware/ovmf_ia32.bin"))
1208 #:make-flags (list "-j" "1"
1209 "XEN_BUILD_DATE=Thu Jan 1 01:00:01 CET 1970"
1210 "XEN_BUILD_TIME=01:00:01"
1213 "SMBIOS_REL_DATE=01/01/1970"
1214 "VGABIOS_REL_DATE=01 Jan 1970"
1215 ; QEMU_TRADITIONAL_LOC
1217 "SYSCONFIG_DIR=/tmp/etc/default"
1218 (string-append "BASH_COMPLETION_DIR="
1219 (assoc-ref %outputs "out")
1220 "/etc/bash_completion.d")
1221 (string-append "BOOT_DIR="
1222 (assoc-ref %outputs "out")
1224 (string-append "DEBUG_DIR="
1225 (assoc-ref %outputs "out")
1227 (string-append "EFI_DIR="
1228 (assoc-ref %outputs "out")
1229 "/lib/efi") ; TODO lib64 ?
1230 "MINIOS_UPSTREAM_URL="
1231 ;(string-append "DISTDIR="
1232 ; (assoc-ref %outputs "out"))
1234 #:test-target "test"
1236 (modify-phases %standard-phases
1237 (add-after 'unpack 'unpack-mini-os
1238 (lambda* (#:key inputs #:allow-other-keys)
1239 (copy-recursively (assoc-ref inputs "mini-os") "extras/mini-os")
1241 (add-after 'unpack-mini-os 'patch
1242 (lambda* (#:key inputs outputs #:allow-other-keys)
1243 (substitute* "tools/firmware/Rules.mk"
1244 (("override XEN_TARGET_ARCH = x86_32")
1245 (string-append "override XEN_TARGET_ARCH = x86_32
1246 override CC = " (assoc-ref inputs "cross-gcc") "/bin/i686-linux-gnu-gcc"))
1248 (string-append "CFLAGS=-I" (assoc-ref inputs "cross-libc")
1250 (substitute* "config/x86_32.mk"
1251 (("CFLAGS += -m32 -march=i686")
1252 (string-append "CFLAGS += -march=i686 -I"
1253 (assoc-ref inputs "cross-libc")
1255 ;; /var is not in /gnu/store , so don't try to create it.
1256 (substitute* '("tools/Makefile"
1257 "tools/xenstore/Makefile"
1258 "tools/xenpaging/Makefile")
1259 (("\\$\\(INSTALL_DIR\\) .*XEN_(DUMP|LOG|RUN|LIB|PAGING)_DIR.*")
1261 (("\\$\\(INSTALL_DIR\\) .*XEN_(RUN|LIB)_STORED.*")
1263 ;; Prevent xen from creating /etc .
1264 (substitute* "tools/examples/Makefile"
1265 ((" install-readmes") "")
1266 ((" install-configs") ""))
1268 (substitute* "tools/pygrub/setup.py"
1270 ; TODO: extra_link_args = ['-Wl,-rpath=/opt/foo'],
1271 (string-append "runtime_library_dirs = ['"
1272 (assoc-ref outputs "out")
1273 "/lib'],\nlibrary_dirs =")))
1275 (add-before 'configure 'patch-xen-script-directory
1276 (lambda* (#:key outputs #:allow-other-keys)
1277 (substitute* '("configure"
1280 (("XEN_SCRIPT_DIR=.*")
1281 (string-append "XEN_SCRIPT_DIR="
1282 (assoc-ref outputs "out")
1283 "/etc/xen/scripts")))
1285 (add-before 'configure 'set-environment-up
1286 (lambda* (#:key make-flags #:allow-other-keys)
1288 (string-contains x "cross-i686-linux"))
1289 (define (filter-environment! filter-predicate
1290 environment-variable-names)
1293 (let* ((env-value (getenv env-name))
1294 (search-path (search-path-as-string->list env-value))
1295 (new-search-path (filter filter-predicate
1297 (new-env-value (list->search-path-as-string
1298 new-search-path ":")))
1299 (setenv env-name new-env-value)))
1300 environment-variable-names))
1301 (setenv "CROSS_CPATH" (getenv "CPATH"))
1302 (setenv "CROSS_LIBRARY_PATH" (getenv "LIBRARY_PATH"))
1303 (filter-environment! cross?
1305 "CROSS_LIBRARY_PATH"))
1306 (filter-environment! (lambda (e) (not (cross? e)))
1309 ;; Guix tries to be helpful and automatically adds
1310 ;; mini-os-git-checkout/include to the include path,
1311 ;; but actually we don't want it to be there (yet).
1312 (filter-environment! (lambda (e)
1315 "mini-os-git-checkout")))
1318 (setenv "EFI_VENDOR" "guix")
1321 (lambda* (#:key make-flags #:allow-other-keys)
1322 (apply invoke "make" "world" make-flags))))))
1324 `(("acpica" ,acpica) ; TODO: patch iasl invocation.
1325 ("bridge-utils" ,bridge-utils) ; TODO: patch invocations.
1327 ("iproute" ,iproute) ; TODO: patch invocations.
1330 ("libyajl" ,libyajl)
1331 ("ncurses" ,ncurses)
1332 ("openssl" ,openssl)
1335 ("qemu" ,qemu-minimal)
1336 ("seabios" ,seabios)
1337 ("util-linux" ,util-linux) ; uuid
1338 ; TODO: ocaml-findlib, ocaml-nox.
1339 ("xz" ,xz) ; for liblzma
1344 ("cmake" ,cmake-minimal)
1347 ("gettext" ,gettext-minimal)
1353 (url "http://xenbits.xen.org/git-http/mini-os.git")
1354 (commit (string-append "xen-RELEASE-" version))))
1357 "1i8pcl19n60i2m9vlg79q3nknpj209c9ic5x10wxaicx45kc107f"))
1358 (file-name "mini-os-git-checkout")))
1361 ("pkg-config" ,pkg-config)
1362 ("python" ,python-2)
1364 ("cross-gcc" ,(cross-gcc "i686-linux-gnu"
1365 #:xbinutils (cross-binutils "i686-linux-gnu")
1366 #:libc (cross-libc "i686-linux-gnu")))
1367 ("cross-libc" ,(cross-libc "i686-linux-gnu")) ; header files
1368 ("cross-libc-static" ,(cross-libc "i686-linux-gnu") "static")))
1369 (home-page "https://xenproject.org/")
1370 (synopsis "Xen Virtual Machine Monitor")
1371 (description "This package provides the Xen Virtual Machine Monitor
1372 which is a hypervisor.")
1373 ;; TODO: Some files are licensed differently. List those.
1374 (license license:gpl2)
1375 (supported-systems '("i686-linux" "x86_64-linux" "armhf-linux"))))
1377 (define-public osinfo-db-tools
1379 (name "osinfo-db-tools")
1383 (uri (string-append "https://releases.pagure.org/libosinfo/osinfo-db-tools-"
1388 "08x8mrafphyll0d35xdc143rip3ahrz6bmzhc85nwhq7yk2vxpab"))))
1389 (build-system meson-build-system)
1391 `(("libsoup" ,libsoup)
1392 ("libxml2" ,libxml2)
1393 ("libxslt" ,libxslt)
1394 ("json-glib" ,json-glib)
1395 ("libarchive" ,libarchive)))
1398 ("gobject-introspection" ,gobject-introspection)
1399 ("gettext" ,gettext-minimal)
1400 ("pkg-config" ,pkg-config)
1403 ("pytest" ,python-pytest)
1404 ("requests" ,python-requests)))
1405 (home-page "https://gitlab.com/libosinfo/osinfo-db-tools")
1406 (synopsis "Tools for managing the osinfo database")
1407 (description "This package contains a set of tools to assist
1408 administrators and developers in managing the database.")
1409 (license license:lgpl2.0+)))
1411 (define-public osinfo-db
1414 (version "20200203")
1417 (uri (string-append "https://releases.pagure.org/libosinfo/osinfo-db-"
1421 "1zjq1dhlci00j17dij7s3l30hybzmaykpk5b6bd5xbllp745njn5"))))
1422 (build-system trivial-build-system)
1424 `(#:modules ((guix build utils))
1427 (use-modules (guix build utils))
1428 (let* ((out (assoc-ref %outputs "out"))
1429 (osinfo-dir (string-append out "/share/osinfo"))
1430 (source (assoc-ref %build-inputs "source"))
1432 (string-append (assoc-ref %build-inputs "osinfo-db-tools")
1433 "/bin/osinfo-db-import")))
1434 (mkdir-p osinfo-dir)
1435 (invoke osinfo-db-import "--dir" osinfo-dir source)
1438 `(("intltool" ,intltool)
1439 ("osinfo-db-tools" ,osinfo-db-tools)))
1440 (home-page "https://gitlab.com/libosinfo/osinfo-db")
1441 (synopsis "Database of information about operating systems")
1442 (description "Osinfo-db provides the database files for use with the
1443 libosinfo library. It provides information about guest operating systems for
1444 use with virtualization provisioning tools")
1445 (license license:lgpl2.0+)))