1 ;;; GNU Guix --- Functional package management for GNU
2 ;;; Copyright © 2013, 2014, 2015, 2016, 2017 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)
135 #:configure-flags (list "--enable-usb-redir" "--enable-opengl"
137 (string-append "--smbd="
138 (assoc-ref %outputs "out")
139 "/libexec/samba-wrapper")
140 "--audio-drv-list=alsa,pa,sdl")
141 ;; Make build and test output verbose to facilitate investigation upon failure.
142 #:make-flags '("V=1")
144 (modify-phases %standard-phases
146 (lambda* (#:key inputs outputs (configure-flags '())
148 ;; The `configure' script doesn't understand some of the
149 ;; GNU options. Thus, add a new phase that's compatible.
150 (let ((out (assoc-ref outputs "out")))
151 (setenv "SHELL" (which "bash"))
153 ;; While we're at it, patch for tests.
154 (substitute* "tests/libqtest.c"
155 (("/bin/sh") (which "sh")))
157 ;; The binaries need to be linked against -lrt.
158 (setenv "LDFLAGS" "-lrt")
161 ,(string-append "--cc=" (which "gcc"))
162 ;; Some architectures insist on using HOST_CC
163 ,(string-append "--host-cc=" (which "gcc"))
164 "--disable-debug-info" ; save build space
165 "--enable-virtfs" ; just to be sure
166 ,(string-append "--prefix=" out)
167 ,(string-append "--sysconfdir=/etc")
168 ,@configure-flags)))))
169 (add-after 'install 'install-info
170 (lambda* (#:key inputs outputs #:allow-other-keys)
171 ;; Install the Info manual, unless Texinfo is missing.
172 (when (assoc-ref inputs "texinfo")
173 (let* ((out (assoc-ref outputs "out"))
174 (dir (string-append out "/share/info")))
175 (invoke "make" "info")
176 (for-each (lambda (info)
177 (install-file info dir))
178 (find-files "." "\\.info"))))
180 ;; Create a wrapper for Samba. This allows QEMU to use Samba without
181 ;; pulling it in as an input. Note that you need to explicitly install
182 ;; Samba in your Guix profile for Samba support.
183 (add-after 'install-info 'create-samba-wrapper
184 (lambda* (#:key inputs outputs #:allow-other-keys)
185 (let* ((out (assoc-ref %outputs "out"))
186 (libexec (string-append out "/libexec")))
187 (call-with-output-file "samba-wrapper"
189 (format port "#!/bin/sh
191 (chmod "samba-wrapper" #o755)
192 (install-file "samba-wrapper" libexec))
194 (add-before 'configure 'prevent-network-configuration
196 ;; Prevent the build from trying to use git to fetch from the net.
197 (substitute* "Makefile"
198 (("@./config.status")
200 (add-before 'check 'disable-unusable-tests
201 (lambda* (#:key inputs outputs #:allow-other-keys)
202 (substitute* "tests/Makefile.include"
203 ;; Comment out the test-qga test, which needs /sys and
204 ;; fails within the build environment.
205 (("check-unit-.* tests/test-qga" all)
206 (string-append "# " all)))
207 (substitute* "tests/Makefile.include"
208 ;; Comment out the test-char test, which needs networking and
209 ;; fails within the build environment.
210 (("check-unit-.* tests/test-char" all)
211 (string-append "# " all)))
213 (inputs ; TODO: Add optional inputs.
214 `(("alsa-lib" ,alsa-lib)
220 ("libcap" ,libcap) ; virtfs support requires libcap & libattr
222 ("libepoxy" ,libepoxy)
223 ("libjpeg" ,libjpeg-turbo)
225 ("libseccomp" ,libseccomp)
226 ("libusb" ,libusb) ;USB pass-through support
229 ;; ("pciutils" ,pciutils)
231 ("pulseaudio" ,pulseaudio)
234 ("usbredir" ,usbredir)
235 ("util-linux" ,util-linux)
237 ("virglrenderer" ,virglrenderer)
239 (native-inputs `(("gettext" ,gettext-minimal)
240 ("glib:bin" ,glib "bin") ; gtester, etc.
244 ("pkg-config" ,pkg-config)
245 ("python-wrapper" ,python-wrapper)
246 ("python-sphinx" ,python-sphinx)
247 ("texinfo" ,texinfo)))
248 (home-page "https://www.qemu.org")
249 (synopsis "Machine emulator and virtualizer")
251 "QEMU is a generic machine emulator and virtualizer.
253 When used as a machine emulator, QEMU can run OSes and programs made for one
254 machine (e.g. an ARM board) on a different machine---e.g., your own PC. By
255 using dynamic translation, it achieves very good performance.
257 When used as a virtualizer, QEMU achieves near native performances by
258 executing the guest code directly on the host CPU. QEMU supports
259 virtualization when executing under the Xen hypervisor or using
260 the KVM kernel module in Linux. When using KVM, QEMU can virtualize x86,
261 server and embedded PowerPC, and S390 guests.")
263 ;; Many files are GPLv2+, but some are GPLv2-only---e.g., `memory.c'.
264 (license license:gpl2)
266 ;; Several tests fail on MIPS; see <http://hydra.gnu.org/build/117914>.
267 (supported-systems (delete "mips64el-linux" %supported-systems))))
269 (define-public qemu-minimal
270 ;; QEMU without GUI support.
271 (package (inherit qemu)
272 (name "qemu-minimal")
273 (synopsis "Machine emulator and virtualizer (without GUI)")
275 (substitute-keyword-arguments (package-arguments qemu)
276 ((#:configure-flags _ '(list))
277 ;; Restrict to the targets supported by Guix.
278 ''("--target-list=i386-softmmu,x86_64-softmmu,mips64el-softmmu,arm-softmmu,aarch64-softmmu"))))
280 ;; Remove dependencies on optional libraries, notably GUI libraries.
281 (native-inputs (fold alist-delete (package-native-inputs qemu)
283 (inputs (fold alist-delete (package-inputs qemu)
284 '("libusb" "mesa" "sdl2" "spice" "virglrenderer" "gtk+"
285 "usbredir" "libdrm" "libepoxy" "pulseaudio" "vde2")))))
287 (define-public libosinfo
294 (uri (string-append "https://releases.pagure.org/libosinfo/libosinfo-"
298 "1s97sv24bybggjx6hgqba2qdqz3ivfpd4cmkh4zm5y59sim109mv"))))
299 (build-system meson-build-system)
302 (list (string-append "-Dwith-usb-ids-path="
303 (assoc-ref %build-inputs "usb.ids"))
304 (string-append "-Dwith-pci-ids-path="
305 (assoc-ref %build-inputs "pci.ids")))
307 (modify-phases %standard-phases
308 (add-after 'unpack 'patch-osinfo-path
309 (lambda* (#:key inputs #:allow-other-keys)
310 (substitute* "osinfo/osinfo_loader.c"
311 (("path = DATA_DIR.*")
312 (string-append "path = \"" (assoc-ref inputs "osinfo-db")
313 "/share/osinfo\";")))
316 `(("libsoup" ,libsoup)
319 ("osinfo-db" ,osinfo-db)))
321 `(("glib" ,glib "bin") ; glib-mkenums, etc.
322 ("gobject-introspection" ,gobject-introspection)
325 ("intltool" ,intltool)
326 ("pkg-config" ,pkg-config)
330 (uri "https://github.com/pciutils/pciids/raw/ad02084f0bc143e3c15e31a6152a3dfb1d7a3156/pci.ids")
333 "0kfhpj5rnh24hz2714qhfmxk281vwc2w50sm73ggw5d15af7zfsw"))))
337 (uri "https://svn.code.sf.net/p/linux-usb/repo/trunk/htdocs/usb.ids?r=2681")
338 (file-name "usb.ids")
341 "1m6yhvz5k8aqzxgk7xj3jkk8frl1hbv0h3vgj4wbnvnx79qnvz3r"))))))
342 (home-page "https://libosinfo.org/")
343 (synopsis "Operating system information database")
344 (description "libosinfo is a GObject based library API for managing
345 information about operating systems, hypervisors and the (virtual) hardware
346 devices they can support. It includes a database containing device metadata
347 and provides APIs to match/identify optimal devices for deploying an operating
348 system on a hypervisor. Via GObject Introspection, the API is available in
349 all common programming languages. Vala bindings are also provided.")
350 ;; The library files are released under LGPLv2.1 or later; the source
351 ;; files in the "tools" directory are released under GPLv2+.
352 (license (list license:lgpl2.1+ license:gpl2+))))
361 "https://linuxcontainers.org/downloads/lxc/lxc-"
365 "1igxqgx8q9cp15mcp1y8j564bl85ijw04jcmgb1s5bmfbg1751sd"))))
366 (build-system gnu-build-system)
368 `(("pkg-config" ,pkg-config)))
372 ("libseccomp" ,libseccomp)
373 ("libselinux" ,libselinux)))
376 (list (string-append "--docdir=" (assoc-ref %outputs "out")
377 "/share/doc/" ,name "-" ,version)
379 "--localstatedir=/var")
381 ;; Treat the kernel headers as system headers to silence
382 ;; compiler warnings from those.
383 (list (string-append "C_INCLUDE_PATH="
384 (assoc-ref %build-inputs "kernel-headers")
387 (modify-phases %standard-phases
389 (lambda* (#:key outputs #:allow-other-keys)
390 (let* ((out (assoc-ref outputs "out"))
391 (bashcompdir (string-append out "/etc/bash_completion.d")))
392 (invoke "make" "install"
393 (string-append "bashcompdir=" bashcompdir)
394 ;; Don't install files into /var and /etc.
395 "LXCPATH=/tmp/var/lib/lxc"
396 "localstatedir=/tmp/var"
397 "sysconfdir=/tmp/etc"
398 "sysconfigdir=/tmp/etc/default")))))))
399 (synopsis "Linux container tools")
400 (home-page "https://linuxcontainers.org/")
402 "LXC is a userspace interface for the Linux kernel containment features.
403 Through a powerful API and simple tools, it lets Linux users easily create and
404 manage system or application containers.")
405 (license license:lgpl2.1+)))
407 (define-public libvirt
414 (uri (string-append "https://libvirt.org/sources/libvirt-"
417 (base32 "0m8cqaqflvys5kaqpvb0qr4k365j09jc5xk6x70yvg8qkcl2hcz2"))
419 (search-patches "libvirt-create-machine-cgroup.patch"))))
420 (build-system gnu-build-system)
424 "--with-qemu-user=nobody"
425 "--with-qemu-group=kvm"
427 (string-append "--docdir=" (assoc-ref %outputs "out") "/share/doc/"
430 "--localstatedir=/var")
432 (modify-phases %standard-phases
433 (add-before 'configure 'fix-BOURNE_SHELL-definition
434 ;; BOURNE_SHELL is hard-#defined to ‘/bin/sh’, causing test failures.
436 (substitute* "config.h.in"
437 (("/bin/sh") (which "sh")))
439 (add-before 'configure 'patch-libtirpc-file-names
440 (lambda* (#:key inputs #:allow-other-keys)
441 ;; libvirt uses an m4 macro instead of pkg-config to determine where
442 ;; the RPC headers are located. Tell it to look in the right place.
443 (substitute* "configure"
444 (("/usr/include/tirpc") ;defined in m4/virt-xdr.m4
445 (string-append (assoc-ref inputs "libtirpc")
448 (add-before 'configure 'disable-broken-tests
450 (let ((tests (list "commandtest" ; hangs idly
451 "qemuxml2argvtest" ; fails
452 "qemuhotplugtest" ; fails
453 "virnetsockettest" ; tries to network
454 "virshtest"))) ; fails
455 (substitute* "tests/Makefile.in"
456 (((format #f "(~a)\\$\\(EXEEXT\\)" (string-join tests "|")))
460 ;; Since the sysconfdir and localstatedir should be /etc and /var
461 ;; at runtime, we must prevent writing to them at installation
463 (lambda* (#:key make-flags #:allow-other-keys)
464 (apply invoke "make" "install"
465 "sysconfdir=/tmp/etc"
466 "localstatedir=/tmp/var"
469 `(("libxml2" ,libxml2)
471 ("libpciaccess" ,libpciaccess)
476 ("libtirpc" ,libtirpc) ;for <rpc/rpc.h>
477 ("libuuid" ,util-linux)
478 ("lvm2" ,lvm2) ;for libdevmapper
481 ("cyrus-sasl" ,cyrus-sasl)
484 ("dmidecode" ,dmidecode)
486 ("ebtables" ,ebtables)
488 ("iptables" ,iptables)))
490 `(("xsltproc" ,libxslt)
492 ("pkg-config" ,pkg-config)
494 ("python" ,python-wrapper)))
495 (home-page "https://libvirt.org")
496 (synopsis "Simple API for virtualization")
497 (description "Libvirt is a C toolkit to interact with the virtualization
498 capabilities of recent versions of Linux. The library aims at providing long
499 term stable C API initially for the Xen paravirtualization but should be able
500 to integrate other virtualization mechanisms if needed.")
501 (license license:lgpl2.1+)))
503 (define-public libvirt-glib
505 (name "libvirt-glib")
509 (uri (string-append "ftp://libvirt.org/libvirt/glib/"
510 "libvirt-glib-" version ".tar.gz"))
513 "1zpbv4ninc57c9rw4zmmkvvqn7154iv1qfr20kyxn8xplalqrzvz"))))
514 (build-system gnu-build-system)
516 `(("openssl" ,openssl)
517 ("cyrus-sasl" ,cyrus-sasl)
518 ("lvm2" ,lvm2) ; for libdevmapper
519 ("libyajl" ,libyajl)))
521 `(("pkg-config" ,pkg-config)
522 ("intltool" ,intltool)
526 ;; ‘Required:’ by the installed .pc files.
530 ("gobject-introspection" ,gobject-introspection)))
531 (home-page "https://libvirt.org")
532 (synopsis "GLib wrapper around libvirt")
533 (description "libvirt-glib wraps the libvirt library to provide a
534 high-level object-oriented API better suited for glib-based applications, via
538 @item libvirt-glib - GLib main loop integration & misc helper APIs
539 @item libvirt-gconfig - GObjects for manipulating libvirt XML documents
540 @item libvirt-gobject - GObjects for managing libvirt objects
543 (license license:lgpl2.1+)))
545 (define-public python-libvirt
547 (name "python-libvirt")
552 (uri (string-append "https://libvirt.org/sources/python/libvirt-python-"
555 (base32 "0kyz3lx49d8p75mvbzinxc1zgs8g7adn77y9bm15b8b4ad9zl5s6"))))
556 (build-system python-build-system)
559 (modify-phases %standard-phases
560 (add-after 'unpack 'patch-nosetests-path
561 (lambda* (#:key inputs #:allow-other-keys)
562 (substitute* "setup.py"
563 (("\"/usr/bin/nosetests\"")
564 (string-append "\"" (which "nosetests") "\""))
565 (("self\\.spawn\\(\\[sys\\.executable, nose\\]\\)")
566 (format #f "self.spawn([\"~a\", nose])" (which "bash"))))
569 `(("libvirt" ,libvirt)))
571 `(("python-lxml" ,python-lxml)))
573 `(("pkg-config" ,pkg-config)
574 ("python-nose" ,python-nose)))
575 (home-page "https://libvirt.org")
576 (synopsis "Python bindings to libvirt")
577 (description "This package provides Python bindings to the libvirt
578 virtualization library.")
579 (license license:lgpl2.1+)))
581 (define-public python2-libvirt
582 (package-with-python2 python-libvirt))
584 (define-public virt-manager
586 (name "virt-manager")
590 (uri (string-append "https://virt-manager.org/download/sources"
591 "/virt-manager/virt-manager-"
595 "06ws0agxlip6p6n3n43knsnjyd91gqhh2dadgc33wl9lx1k8vn6g"))))
596 (build-system python-build-system)
598 `(#:use-setuptools? #f ; uses custom distutils 'install' command
599 ;; Some of the tests seem to require network access to install virtual
602 #:imported-modules ((guix build glib-or-gtk-build-system)
603 ,@%python-build-system-modules)
604 #:modules ((ice-9 match)
606 (guix build python-build-system)
607 ((guix build glib-or-gtk-build-system) #:prefix glib-or-gtk:)
610 (modify-phases %standard-phases
611 (add-after 'unpack 'fix-setup
612 (lambda* (#:key outputs #:allow-other-keys)
613 (substitute* "virtinst/buildconfig.py"
614 (("/usr") (assoc-ref outputs "out")))
616 (add-after 'unpack 'fix-qemu-img-reference
617 (lambda* (#:key inputs #:allow-other-keys)
618 (substitute* "virtconv/formats.py"
619 (("/usr(/bin/qemu-img)" _ suffix)
620 (string-append (assoc-ref inputs "qemu") suffix)))
622 (add-after 'unpack 'fix-default-uri
623 (lambda* (#:key inputs #:allow-other-keys)
624 ;; Xen is not available for now - so only patch qemu.
625 (substitute* "virtManager/createconn.py"
626 (("/usr(/bin/qemu-system)" _ suffix)
627 (string-append (assoc-ref inputs "qemu") suffix)))
629 (add-before 'wrap 'wrap-with-GI_TYPELIB_PATH
630 (lambda* (#:key inputs outputs #:allow-other-keys)
631 (let* ((bin (string-append (assoc-ref outputs "out") "/bin"))
632 (bin-files (find-files bin ".*"))
633 (paths (map (match-lambda
634 ((output . directory)
635 (let* ((girepodir (string-append
637 "/lib/girepository-1.0")))
638 (if (file-exists? girepodir)
641 (for-each (lambda (file)
642 (format #t "wrapping ~a\n" file)
644 `("GI_TYPELIB_PATH" ":" prefix
645 ,(filter identity paths))))
648 (add-after 'install 'glib-or-gtk-compile-schemas
649 (assoc-ref glib-or-gtk:%standard-phases 'glib-or-gtk-compile-schemas))
650 (add-after 'install 'glib-or-gtk-wrap
651 (assoc-ref glib-or-gtk:%standard-phases 'glib-or-gtk-wrap)))))
656 ("gtksourceview" ,gtksourceview)
658 ("libvirt-glib" ,libvirt-glib)
659 ("libosinfo" ,libosinfo)
661 ("python-libvirt" ,python-libvirt)
662 ("python-requests" ,python-requests)
663 ("python-ipaddress" ,python-ipaddress)
664 ("python-pycairo" ,python-pycairo)
665 ("python-pygobject" ,python-pygobject)
666 ("python-libxml2" ,python-libxml2)
667 ("spice-gtk" ,spice-gtk)))
668 ;; virt-manager searches for qemu-img or kvm-img in the PATH.
672 `(("glib" ,glib "bin") ; glib-compile-schemas
673 ("gobject-introspection" ,gobject-introspection)
674 ("gtk+" ,gtk+ "bin") ; gtk-update-icon-cache
675 ("perl" ,perl) ; pod2man
676 ("intltool" ,intltool)))
677 (home-page "https://virt-manager.org/")
678 (synopsis "Manage virtual machines")
680 "The virt-manager application is a desktop user interface for managing
681 virtual machines through libvirt. It primarily targets KVM VMs, but also
682 manages Xen and LXC (Linux containers). It presents a summary view of running
683 domains, their live performance and resource utilization statistics.")
684 (license license:gpl2+)))
692 (uri (string-append "http://download.openvz.org/criu/criu-"
696 "1yn9ix9lqvqvjrs3a3g6g1wqfniyf9n7giy0mr3jvijmrcm7y0pa"))))
697 (build-system gnu-build-system)
699 `(#:test-target "test"
700 #:tests? #f ; tests require mounting as root
702 (list (string-append "PREFIX=" (assoc-ref %outputs "out"))
703 (string-append "LIBDIR=" (assoc-ref %outputs "out")
705 (string-append "ASCIIDOC=" (assoc-ref %build-inputs "asciidoc")
707 (string-append "XMLTO=" (assoc-ref %build-inputs "xmlto")
710 (modify-phases %standard-phases
712 (lambda* (#:key inputs #:allow-other-keys)
713 ;; The includes for libnl are located in a sub-directory.
714 (setenv "C_INCLUDE_PATH"
715 (string-append (assoc-ref inputs "libnl")
717 ;; Also add the kernel headers here so that GCC
718 ;; treats them as "system headers". Otherwise
719 ;; the build fails with -Werror because parasite.c
720 ;; includes both <linux/fs.h> and <sys/mount.h>,
721 ;; which define some of the same constants.
722 (assoc-ref inputs "kernel-headers")
725 (add-after 'configure 'fix-documentation
726 (lambda* (#:key inputs outputs #:allow-other-keys)
727 (substitute* "Documentation/Makefile"
730 "-m custom.xsl --skip-validation -x "
731 (assoc-ref inputs "docbook-xsl") "/xml/xsl/"
732 ,(package-name docbook-xsl) "-"
733 ,(package-version docbook-xsl)
734 "/manpages/docbook.xsl")))
736 (add-after 'unpack 'hardcode-variables
737 (lambda* (#:key inputs #:allow-other-keys)
738 ;; Hardcode arm version detection
739 (substitute* "Makefile"
740 (("ARMV.*:=.*") "ARMV := 7\n"))
741 ;; We are currently using python-2
742 (substitute* "crit/Makefile"
743 (("\\$\\(PYTHON\\)") "python2"))
744 (substitute* "lib/Makefile"
746 (string-append (assoc-ref inputs "python")
749 (add-before 'build 'fix-symlink
750 (lambda* (#:key inputs #:allow-other-keys)
751 ;; The file 'images/google/protobuf/descriptor.proto' points to
752 ;; /usr/include/..., which obviously does not exist.
753 (let* ((file "google/protobuf/descriptor.proto")
754 (target (string-append "images/" file))
755 (source (string-append (assoc-ref inputs "protobuf")
758 (symlink source target)
760 (add-after 'install 'wrap
761 (lambda* (#:key inputs outputs #:allow-other-keys)
762 ;; Make sure 'crit' runs with the correct PYTHONPATH.
763 (let* ((out (assoc-ref outputs "out"))
764 (path (string-append out
766 (string-take (string-take-right
767 (assoc-ref inputs "python") 5) 3)
769 (getenv "PYTHONPATH"))))
770 (wrap-program (string-append out "/bin/crit")
771 `("PYTHONPATH" ":" prefix (,path))))
774 `(("protobuf" ,protobuf)
776 ("python2-protobuf" ,python2-protobuf)
777 ("python2-ipaddr" ,python2-ipaddr)
785 `(("pkg-config" ,pkg-config)
787 ("protobuf-c" ,protobuf-c)
788 ("asciidoc" ,asciidoc)
790 ("docbook-xml" ,docbook-xml)
791 ("docbook-xsl" ,docbook-xsl)))
792 (home-page "https://criu.org")
793 (synopsis "Checkpoint and restore in user space")
794 (description "Using this tool, you can freeze a running application (or
795 part of it) and checkpoint it to a hard drive as a collection of files. You
796 can then use the files to restore and run the application from the point it
797 was frozen at. The distinctive feature of the CRIU project is that it is
798 mainly implemented in user space.")
799 ;; The project is licensed under GPLv2; files in the lib/ directory are
801 (license (list license:gpl2 license:lgpl2.1))))
803 (define-public qmpbackup
810 (url "https://github.com/abbbi/qmpbackup.git")
812 (file-name (git-file-name name version))
815 "0swhp5byz44brhyis1a39p11fyn9q84xz5q6v2fah29r7d71kmmx"))))
816 (build-system python-build-system)
818 `(#:python ,python-2))
819 (home-page "https://github.com/abbbi/qmpbackup")
820 (synopsis "Backup and restore QEMU machines")
821 (description "qmpbackup is designed to create and restore full and
822 incremental backups of running QEMU virtual machines via QMP, the QEMU
824 (license license:gpl3+)))
826 (define-public looking-glass-client
827 (let ((commit "182c4752d57690da7f99d5e788de9b8baea33895"))
829 (name "looking-glass-client")
830 (version (string-append "a12-" (string-take commit 7)))
834 (uri (git-reference (url "https://github.com/gnif/LookingGlass")
836 (file-name (git-file-name name version))
839 "02bq46ndmzq9cihazzn7xq1x7q5nzm7iw4l9lqzihxcxp9famkhw"))
840 (modules '((guix build utils)))
843 ;; Do not create binaries optimized for the CPU of the build machine,
844 ;; for reproducibility and compatibility. TODO: in the next version
845 ;; of looking glass, this is exposed as a CMake configure option.
846 (substitute* "client/CMakeLists.txt"
850 (build-system cmake-build-system)
851 (inputs `(("fontconfig" ,fontconfig)
856 ("sdl2-ttf" ,sdl2-ttf)
857 ("spice-protocol" ,spice-protocol)
858 ("wayland" ,wayland)))
859 (native-inputs `(("libconfig" ,libconfig)
861 ("pkg-config" ,pkg-config)))
863 `(#:tests? #f ;; No tests are available.
864 #:make-flags '("CC=gcc")
865 #:phases (modify-phases %standard-phases
866 (add-before 'configure 'chdir-to-client
867 (lambda* (#:key outputs #:allow-other-keys)
870 (add-after 'chdir-to-client 'add-missing-include
872 ;; Mimic upstream commit b9797529893, required since the
873 ;; update to Mesa 19.2.
874 (substitute* "renderers/egl/shader.h"
875 (("#include <stdbool\\.h>")
876 "#include <stdbool.h>\n#include <stddef.h>"))
879 (lambda* (#:key outputs #:allow-other-keys)
880 (install-file "looking-glass-client"
881 (string-append (assoc-ref outputs "out")
884 (home-page "https://looking-glass.hostfission.com")
885 (synopsis "KVM Frame Relay (KVMFR) implementation")
886 (description "Looking Glass allows the use of a KVM (Kernel-based Virtual
887 Machine) configured for VGA PCI Pass-through without an attached physical
888 monitor, keyboard or mouse. It displays the VM's rendered contents on your main
890 ;; This package requires SSE instructions.
891 (supported-systems '("i686-linux" "x86_64-linux"))
892 (license license:gpl2+))))
897 (version "1.0.0-rc6")
901 "https://github.com/opencontainers/runc/releases/"
902 "download/v" version "/runc.tar.xz"))
903 (file-name (string-append name "-" version ".tar.xz"))
904 (patches (search-patches "runc-CVE-2019-5736.patch"))
907 "1c7832dq70slkjh8qp2civ1wxhhdd2hrx84pq7db1mmqc9fdr3cc"))))
908 (build-system go-build-system)
910 '(#:import-path "github.com/opencontainers/runc"
912 ;; XXX: 20/139 tests fail due to missing /var, cgroups and apparmor in
913 ;; the build environment.
916 (modify-phases %standard-phases
918 (lambda* (#:key source import-path #:allow-other-keys)
919 ;; Unpack the tarball into 'runc' instead of 'runc-1.0.0-rc5'.
920 (let ((dest (string-append "src/" import-path)))
922 (invoke "tar" "-C" (string-append "src/" import-path)
923 "--strip-components=1"
926 (lambda* (#:key import-path #:allow-other-keys)
927 (chdir (string-append "src/" import-path))
928 ;; XXX: requires 'go-md2man'.
929 ;; (invoke "make" "man")
933 ;; (invoke "make" "localunittest")))
935 (lambda* (#:key outputs #:allow-other-keys)
936 (let ((out (assoc-ref outputs "out")))
937 (invoke "make" "install" "install-bash"
938 (string-append "PREFIX=" out))))))))
940 `(("pkg-config" ,pkg-config)))
942 `(("libseccomp" ,libseccomp)))
943 (synopsis "Open container initiative runtime")
944 (home-page "https://www.opencontainers.org/")
946 "@command{runc} is a command line client for running applications
947 packaged according to the
948 @uref{https://github.com/opencontainers/runtime-spec/blob/master/spec.md, Open
949 Container Initiative (OCI) format} and is a compliant implementation of the
950 Open Container Initiative specification.")
951 (license license:asl2.0)))
960 "https://github.com/openSUSE/umoci/releases/download/v"
961 version "/umoci.tar.xz"))
962 (file-name (string-append "umoci-" version ".tar.xz"))
965 "0x1yyvpllz6fyy9xip6f7b6c94v984n3faf8p50fr9y4ygkgi15a"))))
966 (build-system go-build-system)
968 '(#:import-path "github.com/openSUSE/umoci"
971 (modify-phases %standard-phases
973 (lambda* (#:key source import-path #:allow-other-keys)
974 ;; Unpack the tarball into 'umoci' instead of "runc-${version}".
975 (let ((dest (string-append "src/" import-path)))
977 (invoke "tar" "-C" (string-append "src/" import-path)
978 "--strip-components=1"
981 (lambda* (#:key import-path #:allow-other-keys)
982 (chdir (string-append "src/" import-path))
983 ;; TODO: build manpages with 'go-md2man'.
984 (invoke "make" "SHELL=bash")))
986 (lambda* (#:key outputs #:allow-other-keys)
987 (let* ((out (assoc-ref outputs "out"))
988 (bindir (string-append out "/bin")))
989 (install-file "umoci" bindir)
991 (home-page "https://umo.ci/")
992 (synopsis "Tool for modifying Open Container images")
994 "@command{umoci} is a tool that allows for high-level modification of an
995 Open Container Initiative (OCI) image layout and its tagged images.")
996 (license license:asl2.0)))
998 (define-public skopeo
1005 (url "https://github.com/projectatomic/skopeo")
1006 (commit (string-append "v" version))))
1007 (file-name (git-file-name name version))
1010 "1bagirzdzjhicn5dr691092ac3q6lhz3xngjzgqiqkxnvpz7p6cn"))))
1011 (build-system go-build-system)
1013 `(("pkg-config" ,pkg-config)))
1015 `(("btrfs-progs" ,btrfs-progs)
1017 ("libassuan" ,libassuan)
1018 ("libselinux" ,libselinux)
1019 ("libostree" ,libostree)
1024 '(#:import-path "github.com/projectatomic/skopeo"
1025 #:install-source? #f
1026 #:tests? #f ; The tests require Docker
1028 (modify-phases %standard-phases
1030 (lambda* (#:key import-path #:allow-other-keys)
1031 (chdir (string-append "src/" import-path))
1032 ;; TODO: build manpages with 'go-md2man'.
1033 (invoke "make" "binary-local")))
1035 (lambda* (#:key outputs #:allow-other-keys)
1036 (let ((out (assoc-ref outputs "out")))
1037 (invoke "make" "install-binary" "install-completions"
1038 (string-append "PREFIX=" out))))))))
1039 (home-page "https://github.com/projectatomic/skopeo")
1040 (synopsis "Interact with container images and container image registries")
1042 "@command{skopeo} is a command line utility providing various operations
1043 with container images and container image registries. It can:
1046 @item Copy container images between various containers image stores,
1047 converting them as necessary.
1049 @item Convert a Docker schema 2 or schema 1 container image to an OCI image.
1051 @item Inspect a repository on a container registry without needlessly pulling
1054 @item Sign and verify container images.
1056 @item Delete container images from a remote container registry.
1059 (license license:asl2.0)))
1061 (define-public python-vagrant
1063 (name "python-vagrant")
1068 (uri (pypi-uri "python-vagrant" version))
1071 "1ikrh6canhcxg5y7pzmkcnnydikppv7s6sm9prfx90nk0ac8m6mg"))))
1072 (build-system python-build-system)
1074 '(#:tests? #f)) ; tests involve running vagrant.
1075 (home-page "https://github.com/todddeluca/python-vagrant")
1076 (synopsis "Python bindings for Vagrant")
1078 "Python-vagrant is a Python module that provides a thin wrapper around the
1079 @code{vagrant} command line executable, allowing programmatic control of Vagrant
1081 (license license:expat)))
1083 (define-public bubblewrap
1089 (uri (string-append "https://github.com/containers/bubblewrap/"
1090 "releases/download/v" version "/bubblewrap-"
1094 "00ycgi6q2yngh06bnz50wkvar6r2jnjf3j158grhi9k13jdrpimr"))))
1095 (build-system gnu-build-system)
1098 (modify-phases %standard-phases
1099 (add-after 'unpack 'fix-test
1100 (lambda* (#:key outputs #:allow-other-keys)
1101 ;; Tests try to access /var/tmp, which is not possible in our build
1102 ;; environment. Let's give them another directory.
1103 ;; /tmp gets overriden in some tests, so we need another directory.
1104 ;; the only possibility is the output directory.
1105 (let ((tmp-dir (string-append (assoc-ref outputs "out") "/tmp")))
1107 (substitute* "tests/test-run.sh"
1108 (("/var/tmp") tmp-dir)
1109 ;; Tests create a temporary python script, so fix its shebang.
1110 (("/usr/bin/env python") (which "python"))
1111 ;; Some tests try to access /usr, but that doesn't exist.
1112 ;; Give them /gnu instead.
1114 (("--ro-bind /bin /bin") "--ro-bind /gnu /bin")
1115 (("--ro-bind /sbin /sbin") "--ro-bind /gnu /sbin")
1116 (("--ro-bind /lib /lib") "--ro-bind /gnu /lib")
1117 ((" */bin/bash") (which "bash"))
1118 (("/bin/sh") (which "sh"))
1119 (("findmnt") (which "findmnt"))))
1121 ;; Remove the directory we gave to tests to have a clean package.
1122 (add-after 'check 'remove-tmp-dir
1123 (lambda* (#:key outputs #:allow-other-keys)
1124 (delete-file-recursively (string-append (assoc-ref outputs "out") "/tmp"))
1127 `(("libcap" ,libcap)))
1129 `(("python-2" ,python-2)
1130 ("util-linux" ,util-linux)))
1131 (home-page "https://github.com/containers/bubblewrap")
1132 (synopsis "Unprivileged sandboxing tool")
1133 (description "Bubblewrap is aimed at running applications in a sandbox,
1134 restricting their access to parts of the operating system or user data such as
1135 the home directory. Bubblewrap always creates a new mount namespace, and the
1136 user can specify exactly what parts of the file system should be made visible
1137 in the sandbox. These directories are mounted with the @code{nodev} option
1138 by default and can be made read-only.")
1139 (license license:lgpl2.0+)))
1141 (define-public bochs
1148 (uri (string-append "https://sourceforge.net/projects/bochs/files/bochs/"
1149 version "/bochs-" version ".tar.gz"))
1151 (base32 "0ql8q6y1k356li1g9gbvl21448mlxphxxi6kjb2b3pxvzd0pp2b3"))))
1152 (build-system gnu-build-system)
1154 `(#:tests? #f)) ; no tests exist
1156 `(("libxrandr" ,libxrandr)))
1157 (home-page "http://bochs.sourceforge.net/")
1158 (synopsis "Emulator for x86 PC")
1160 "Bochs is an emulator which can emulate Intel x86 CPU, common I/O
1161 devices, and a custom BIOS. It can also be compiled to emulate many different
1162 x86 CPUs, from early 386 to the most recent x86-64 Intel and AMD processors.
1163 Bochs can run most Operating Systems inside the emulation including Linux,
1164 DOS or Microsoft Windows.")
1165 (license license:lgpl2.0+)))
1174 (url "git://xenbits.xenproject.org/xen.git")
1175 (commit (string-append "RELEASE-" version))))
1176 (file-name (git-file-name name version))
1179 "1wv1hyfii14vi9lfjmnv07h2gpm3b7kvh2p55f4yy2b40simksgk"))))
1180 (build-system gnu-build-system)
1183 (list "--enable-rpath"
1184 "--disable-qemu-traditional" ; It tries to do "git clone"
1185 "--disable-rombios" ; would try to "git clone" via etherboot.
1186 ;; TODO: Re-enable stubdom (it's "more secure" to use it).
1187 "--disable-stubdom" ; tries to "git clone" old patched newlib.
1188 (string-append "--with-initddir="
1189 (assoc-ref %outputs "out")
1191 (string-append "--with-system-qemu="
1192 (assoc-ref %build-inputs "qemu")
1193 "/bin/qemu-system-i386")
1194 (string-append "--with-system-seabios="
1195 (assoc-ref %build-inputs "seabios")
1196 "/share/firmware/bios.bin")
1197 (string-append "--with-system-ovmf="
1198 (assoc-ref %build-inputs "ovmf")
1199 "/share/firmware/ovmf_ia32.bin"))
1200 #:make-flags (list "-j" "1"
1201 "XEN_BUILD_DATE=Thu Jan 1 01:00:01 CET 1970"
1202 "XEN_BUILD_TIME=01:00:01"
1205 "SMBIOS_REL_DATE=01/01/1970"
1206 "VGABIOS_REL_DATE=01 Jan 1970"
1207 ; QEMU_TRADITIONAL_LOC
1209 "SYSCONFIG_DIR=/tmp/etc/default"
1210 (string-append "BASH_COMPLETION_DIR="
1211 (assoc-ref %outputs "out")
1212 "/etc/bash_completion.d")
1213 (string-append "BOOT_DIR="
1214 (assoc-ref %outputs "out")
1216 (string-append "DEBUG_DIR="
1217 (assoc-ref %outputs "out")
1219 (string-append "EFI_DIR="
1220 (assoc-ref %outputs "out")
1221 "/lib/efi") ; TODO lib64 ?
1222 "MINIOS_UPSTREAM_URL="
1223 ;(string-append "DISTDIR="
1224 ; (assoc-ref %outputs "out"))
1226 #:test-target "test"
1228 (modify-phases %standard-phases
1229 (add-after 'unpack 'unpack-mini-os
1230 (lambda* (#:key inputs #:allow-other-keys)
1231 (copy-recursively (assoc-ref inputs "mini-os") "extras/mini-os")
1233 (add-after 'unpack-mini-os 'patch
1234 (lambda* (#:key inputs outputs #:allow-other-keys)
1235 (substitute* "tools/firmware/Rules.mk"
1236 (("override XEN_TARGET_ARCH = x86_32")
1237 (string-append "override XEN_TARGET_ARCH = x86_32
1238 override CC = " (assoc-ref inputs "cross-gcc") "/bin/i686-linux-gnu-gcc"))
1240 (string-append "CFLAGS=-I" (assoc-ref inputs "cross-libc")
1242 (substitute* "config/x86_32.mk"
1243 (("CFLAGS += -m32 -march=i686")
1244 (string-append "CFLAGS += -march=i686 -I"
1245 (assoc-ref inputs "cross-libc")
1247 ;; /var is not in /gnu/store , so don't try to create it.
1248 (substitute* '("tools/Makefile"
1249 "tools/xenstore/Makefile"
1250 "tools/xenpaging/Makefile")
1251 (("\\$\\(INSTALL_DIR\\) .*XEN_(DUMP|LOG|RUN|LIB|PAGING)_DIR.*")
1253 (("\\$\\(INSTALL_DIR\\) .*XEN_(RUN|LIB)_STORED.*")
1255 ;; Prevent xen from creating /etc .
1256 (substitute* "tools/examples/Makefile"
1257 ((" install-readmes") "")
1258 ((" install-configs") ""))
1260 (substitute* "tools/pygrub/setup.py"
1262 ; TODO: extra_link_args = ['-Wl,-rpath=/opt/foo'],
1263 (string-append "runtime_library_dirs = ['"
1264 (assoc-ref outputs "out")
1265 "/lib'],\nlibrary_dirs =")))
1267 (add-before 'configure 'patch-xen-script-directory
1268 (lambda* (#:key outputs #:allow-other-keys)
1269 (substitute* '("configure"
1272 (("XEN_SCRIPT_DIR=.*")
1273 (string-append "XEN_SCRIPT_DIR="
1274 (assoc-ref outputs "out")
1275 "/etc/xen/scripts")))
1277 (add-before 'configure 'set-environment-up
1278 (lambda* (#:key make-flags #:allow-other-keys)
1280 (string-contains x "cross-i686-linux"))
1281 (define (filter-environment! filter-predicate
1282 environment-variable-names)
1285 (let* ((env-value (getenv env-name))
1286 (search-path (search-path-as-string->list env-value))
1287 (new-search-path (filter filter-predicate
1289 (new-env-value (list->search-path-as-string
1290 new-search-path ":")))
1291 (setenv env-name new-env-value)))
1292 environment-variable-names))
1293 (setenv "CROSS_CPATH" (getenv "CPATH"))
1294 (setenv "CROSS_LIBRARY_PATH" (getenv "LIBRARY_PATH"))
1295 (filter-environment! cross?
1297 "CROSS_LIBRARY_PATH"))
1298 (filter-environment! (lambda (e) (not (cross? e)))
1301 ;; Guix tries to be helpful and automatically adds
1302 ;; mini-os-git-checkout/include to the include path,
1303 ;; but actually we don't want it to be there (yet).
1304 (filter-environment! (lambda (e)
1307 "mini-os-git-checkout")))
1310 (setenv "EFI_VENDOR" "guix")
1313 (lambda* (#:key make-flags #:allow-other-keys)
1314 (apply invoke "make" "world" make-flags))))))
1316 `(("acpica" ,acpica) ; TODO: patch iasl invocation.
1317 ("bridge-utils" ,bridge-utils) ; TODO: patch invocations.
1319 ("iproute" ,iproute) ; TODO: patch invocations.
1322 ("libyajl" ,libyajl)
1323 ("ncurses" ,ncurses)
1324 ("openssl" ,openssl)
1327 ("qemu" ,qemu-minimal)
1328 ("seabios" ,seabios)
1329 ("util-linux" ,util-linux) ; uuid
1330 ; TODO: ocaml-findlib, ocaml-nox.
1331 ("xz" ,xz) ; for liblzma
1336 ("cmake" ,cmake-minimal)
1339 ("gettext" ,gettext-minimal)
1345 (url "http://xenbits.xen.org/git-http/mini-os.git")
1346 (commit (string-append "xen-RELEASE-" version))))
1349 "1i8pcl19n60i2m9vlg79q3nknpj209c9ic5x10wxaicx45kc107f"))
1350 (file-name "mini-os-git-checkout")))
1353 ("pkg-config" ,pkg-config)
1354 ("python" ,python-2)
1356 ("cross-gcc" ,(cross-gcc "i686-linux-gnu"
1357 #:xbinutils (cross-binutils "i686-linux-gnu")
1358 #:libc (cross-libc "i686-linux-gnu")))
1359 ("cross-libc" ,(cross-libc "i686-linux-gnu")) ; header files
1360 ("cross-libc-static" ,(cross-libc "i686-linux-gnu") "static")))
1361 (home-page "https://xenproject.org/")
1362 (synopsis "Xen Virtual Machine Monitor")
1363 (description "This package provides the Xen Virtual Machine Monitor
1364 which is a hypervisor.")
1365 ;; TODO: Some files are licensed differently. List those.
1366 (license license:gpl2)
1367 (supported-systems '("i686-linux" "x86_64-linux" "armhf-linux"))))
1369 (define-public osinfo-db-tools
1371 (name "osinfo-db-tools")
1375 (uri (string-append "https://releases.pagure.org/libosinfo/osinfo-db-tools-"
1380 "08x8mrafphyll0d35xdc143rip3ahrz6bmzhc85nwhq7yk2vxpab"))))
1381 (build-system meson-build-system)
1383 `(("libsoup" ,libsoup)
1384 ("libxml2" ,libxml2)
1385 ("libxslt" ,libxslt)
1386 ("json-glib" ,json-glib)
1387 ("libarchive" ,libarchive)))
1390 ("gobject-introspection" ,gobject-introspection)
1391 ("gettext" ,gettext-minimal)
1392 ("pkg-config" ,pkg-config)
1395 ("pytest" ,python-pytest)
1396 ("requests" ,python-requests)))
1397 (home-page "https://gitlab.com/libosinfo/osinfo-db-tools")
1398 (synopsis "Tools for managing the osinfo database")
1399 (description "This package contains a set of tools to assist
1400 administrators and developers in managing the database.")
1401 (license license:lgpl2.0+)))
1403 (define-public osinfo-db
1406 (version "20200203")
1409 (uri (string-append "https://releases.pagure.org/libosinfo/osinfo-db-"
1413 "1zjq1dhlci00j17dij7s3l30hybzmaykpk5b6bd5xbllp745njn5"))))
1414 (build-system trivial-build-system)
1416 `(#:modules ((guix build utils))
1419 (use-modules (guix build utils))
1420 (let* ((out (assoc-ref %outputs "out"))
1421 (osinfo-dir (string-append out "/share/osinfo"))
1422 (source (assoc-ref %build-inputs "source"))
1424 (string-append (assoc-ref %build-inputs "osinfo-db-tools")
1425 "/bin/osinfo-db-import")))
1426 (mkdir-p osinfo-dir)
1427 (invoke osinfo-db-import "--dir" osinfo-dir source)
1430 `(("intltool" ,intltool)
1431 ("osinfo-db-tools" ,osinfo-db-tools)))
1432 (home-page "https://gitlab.com/libosinfo/osinfo-db")
1433 (synopsis "Database of information about operating systems")
1434 (description "Osinfo-db provides the database files for use with the
1435 libosinfo library. It provides information about guest operating systems for
1436 use with virtualization provisioning tools")
1437 (license license:lgpl2.0+)))