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 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 Rutger Helling <rhelling@mykolab.com>
9 ;;; Copyright © 2017, 2018 Tobias Geerinckx-Rice <me@tobias.gr>
10 ;;; Copyright © 2018 Danny Milosavljevic <dannym@scratchpost.org>
11 ;;; Copyright © 2018 Sou Bunnbu <iyzsong@member.fsf.org>
13 ;;; This file is part of GNU Guix.
15 ;;; GNU Guix is free software; you can redistribute it and/or modify it
16 ;;; under the terms of the GNU General Public License as published by
17 ;;; the Free Software Foundation; either version 3 of the License, or (at
18 ;;; your option) any later version.
20 ;;; GNU Guix is distributed in the hope that it will be useful, but
21 ;;; WITHOUT ANY WARRANTY; without even the implied warranty of
22 ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
23 ;;; GNU General Public License for more details.
25 ;;; You should have received a copy of the GNU General Public License
26 ;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
28 (define-module (gnu packages virtualization)
29 #:use-module (gnu packages)
30 #:use-module (gnu packages admin)
31 #:use-module (gnu packages attr)
32 #:use-module (gnu packages autotools)
33 #:use-module (gnu packages bison)
34 #:use-module (gnu packages check)
35 #:use-module (gnu packages compression)
36 #:use-module (gnu packages curl)
37 #:use-module (gnu packages cyrus-sasl)
38 #:use-module (gnu packages disk)
39 #:use-module (gnu packages dns)
40 #:use-module (gnu packages docbook)
41 #:use-module (gnu packages documentation)
42 #:use-module (gnu packages flex)
43 #:use-module (gnu packages fontutils)
44 #:use-module (gnu packages gettext)
45 #:use-module (gnu packages gl)
46 #:use-module (gnu packages glib)
47 #:use-module (gnu packages gnome)
48 #:use-module (gnu packages gnupg)
49 #:use-module (gnu packages golang)
50 #:use-module (gnu packages gtk)
51 #:use-module (gnu packages image)
52 #:use-module (gnu packages libusb)
53 #:use-module (gnu packages linux)
54 #:use-module (gnu packages ncurses)
55 #:use-module (gnu packages nettle)
56 #:use-module (gnu packages networking)
57 #:use-module (gnu packages package-management)
58 #:use-module (gnu packages perl)
59 #:use-module (gnu packages pkg-config)
60 #:use-module (gnu packages polkit)
61 #:use-module (gnu packages protobuf)
62 #:use-module (gnu packages python)
63 #:use-module (gnu packages python-web)
64 #:use-module (gnu packages pulseaudio)
65 #:use-module (gnu packages selinux)
66 #:use-module (gnu packages sdl)
67 #:use-module (gnu packages spice)
68 #:use-module (gnu packages texinfo)
69 #:use-module (gnu packages textutils)
70 #:use-module (gnu packages tls)
71 #:use-module (gnu packages web)
72 #:use-module (gnu packages xdisorg)
73 #:use-module (gnu packages xml)
74 #:use-module (guix build-system gnu)
75 #:use-module (guix build-system go)
76 #:use-module (guix build-system python)
77 #:use-module (guix download)
78 #:use-module (guix git-download)
79 #:use-module ((guix licenses) #:prefix license:)
80 #:use-module (guix packages)
81 #:use-module (guix utils)
82 #:use-module (srfi srfi-1))
84 (define (qemu-patch commit file-name sha256)
85 "Return an origin for COMMIT."
89 "http://git.qemu.org/?p=qemu.git;a=commitdiff_plain;h="
92 (file-name file-name)))
100 (uri (string-append "https://download.qemu.org/qemu-"
104 "04sp3f1gp4bdb913jf7fw761njaqp2l32wgipp1sapmxx17zcyld"))))
105 (build-system gnu-build-system)
107 '(;; Running tests in parallel can occasionally lead to failures, like:
108 ;; boot_sector_test: assertion failed (signature == SIGNATURE): (0x00000000 == 0x0000dead)
110 #:configure-flags (list "--enable-usb-redir" "--enable-opengl"
111 (string-append "--smbd="
112 (assoc-ref %outputs "out")
113 "/libexec/samba-wrapper")
114 "--audio-drv-list=alsa,pa,sdl")
116 (modify-phases %standard-phases
118 (lambda* (#:key inputs outputs (configure-flags '())
120 ;; The `configure' script doesn't understand some of the
121 ;; GNU options. Thus, add a new phase that's compatible.
122 (let ((out (assoc-ref outputs "out")))
123 (setenv "SHELL" (which "bash"))
125 ;; While we're at it, patch for tests.
126 (substitute* "tests/libqtest.c"
127 (("/bin/sh") (which "sh")))
129 ;; The binaries need to be linked against -lrt.
130 (setenv "LDFLAGS" "-lrt")
133 ,(string-append "--cc=" (which "gcc"))
134 ;; Some architectures insist on using HOST_CC
135 ,(string-append "--host-cc=" (which "gcc"))
136 "--disable-debug-info" ; save build space
137 "--enable-virtfs" ; just to be sure
138 ,(string-append "--prefix=" out)
139 ,(string-append "--sysconfdir=/etc")
140 ,@configure-flags)))))
141 (add-after 'install 'install-info
142 (lambda* (#:key inputs outputs #:allow-other-keys)
143 ;; Install the Info manual, unless Texinfo is missing.
144 (when (assoc-ref inputs "texinfo")
145 (let* ((out (assoc-ref outputs "out"))
146 (dir (string-append out "/share/info")))
147 (invoke "make" "info")
148 (for-each (lambda (info)
149 (install-file info dir))
150 (find-files "." "\\.info"))))
152 ;; Create a wrapper for Samba. This allows QEMU to use Samba without
153 ;; pulling it in as an input. Note that you need to explicitly install
154 ;; Samba in your Guix profile for Samba support.
155 (add-after 'install-info 'create-samba-wrapper
156 (lambda* (#:key inputs outputs #:allow-other-keys)
157 (let* ((out (assoc-ref %outputs "out"))
158 (libexec (string-append out "/libexec")))
159 (call-with-output-file "samba-wrapper"
161 (format port "#!/bin/sh
163 (chmod "samba-wrapper" #o755)
164 (install-file "samba-wrapper" libexec))
166 (add-before 'check 'make-gtester-verbose
168 ;; Make GTester verbose to facilitate investigation upon failure.
169 (setenv "V" "1") #t))
170 (add-before 'check 'disable-test-qga
172 (substitute* "tests/Makefile.include"
173 ;; Comment out the test-qga test, which needs /sys and
174 ;; fails within the build environment.
175 (("check-unit-.* tests/test-qga" all)
176 (string-append "# " all)))
178 (inputs ; TODO: Add optional inputs.
179 `(("alsa-lib" ,alsa-lib)
185 ("libcap" ,libcap) ; virtfs support requires libcap & libattr
187 ("libepoxy" ,libepoxy)
188 ("libjpeg" ,libjpeg-turbo)
190 ("libseccomp" ,libseccomp)
191 ("libusb" ,libusb) ;USB pass-through support
194 ;; ("pciutils" ,pciutils)
196 ("pulseaudio" ,pulseaudio)
199 ("usbredir" ,usbredir)
200 ("util-linux" ,util-linux)
202 ("virglrenderer" ,virglrenderer)
204 (native-inputs `(("gettext" ,gettext-minimal)
205 ("glib:bin" ,glib "bin") ; gtester, etc.
209 ("pkg-config" ,pkg-config)
210 ("python-wrapper" ,python-wrapper)
211 ("texinfo" ,texinfo)))
212 (home-page "https://www.qemu.org")
213 (synopsis "Machine emulator and virtualizer")
215 "QEMU is a generic machine emulator and virtualizer.
217 When used as a machine emulator, QEMU can run OSes and programs made for one
218 machine (e.g. an ARM board) on a different machine---e.g., your own PC. By
219 using dynamic translation, it achieves very good performance.
221 When used as a virtualizer, QEMU achieves near native performances by
222 executing the guest code directly on the host CPU. QEMU supports
223 virtualization when executing under the Xen hypervisor or using
224 the KVM kernel module in Linux. When using KVM, QEMU can virtualize x86,
225 server and embedded PowerPC, and S390 guests.")
227 ;; Many files are GPLv2+, but some are GPLv2-only---e.g., `memory.c'.
228 (license license:gpl2)
230 ;; Several tests fail on MIPS; see <http://hydra.gnu.org/build/117914>.
231 (supported-systems (delete "mips64el-linux" %supported-systems))))
233 (define-public qemu-minimal
234 ;; QEMU without GUI support.
235 (package (inherit qemu)
236 (name "qemu-minimal")
237 (synopsis "Machine emulator and virtualizer (without GUI)")
239 (substitute-keyword-arguments (package-arguments qemu)
240 ((#:configure-flags _ '(list))
241 ;; Restrict to the targets supported by Guix.
242 ''("--target-list=i386-softmmu,x86_64-softmmu,mips64el-softmmu,arm-softmmu,aarch64-softmmu"))))
244 ;; Remove dependencies on optional libraries, notably GUI libraries.
245 (native-inputs (fold alist-delete (package-native-inputs qemu)
247 (inputs (fold alist-delete (package-inputs qemu)
248 '("libusb" "mesa" "sdl2" "spice" "virglrenderer" "gtk+"
249 "usbredir" "libdrm" "libepoxy" "pulseaudio")))))
251 ;; The GRUB test suite fails with later versions of Qemu, so we
252 ;; keep it at 2.10 for now. See
253 ;; <https://lists.gnu.org/archive/html/bug-grub/2018-02/msg00004.html>.
254 ;; This package is hidden since we do not backport updates to it.
255 (define-public qemu-minimal-2.10
258 (inherit qemu-minimal)
262 (uri (string-append "https://download.qemu.org/qemu-"
266 "17w21spvaxaidi2am5lpsln8yjpyp2zi3s3gc6nsxj5arlgamzgw"))
268 (search-patches "qemu-glibc-2.27.patch"))))
269 ;; qemu-minimal-2.10 needs Python 2. Remove below once no longer necessary.
270 (native-inputs `(("python-2" ,python-2)
271 ,@(fold alist-delete (package-native-inputs qemu)
272 '("python-wrapper")))))))
274 (define-public libosinfo
281 (uri (string-append "https://releases.pagure.org/libosinfo/libosinfo-"
285 "0srrs2m6irqd4f867g8ls6jp2dq3ql0l9d0fh80d55sivvn2bd7p"))))
286 (build-system gnu-build-system)
289 (list (string-append "--with-usb-ids-path="
290 (assoc-ref %build-inputs "usb.ids"))
291 (string-append "--with-pci-ids-path="
292 (assoc-ref %build-inputs "pci.ids")))
294 (modify-phases %standard-phases
295 ;; This odd test fails for unknown reasons.
296 (add-after 'unpack 'disable-broken-test
298 (substitute* "test/Makefile.in"
299 (("test-isodetect\\$\\(EXEEXT\\)") ""))
302 `(("libsoup" ,libsoup)
305 ("gobject-introspection" ,gobject-introspection)))
308 ("glib" ,glib "bin") ; glib-mkenums, etc.
311 ("intltool" ,intltool)
312 ("pkg-config" ,pkg-config)
316 (uri "https://github.com/pciutils/pciids/raw/ad02084f0bc143e3c15e31a6152a3dfb1d7a3156/pci.ids")
319 "0kfhpj5rnh24hz2714qhfmxk281vwc2w50sm73ggw5d15af7zfsw"))))
323 (uri "https://svn.code.sf.net/p/linux-usb/repo/trunk/htdocs/usb.ids?r=2681")
324 (file-name "usb.ids")
327 "1m6yhvz5k8aqzxgk7xj3jkk8frl1hbv0h3vgj4wbnvnx79qnvz3r"))))))
328 (home-page "https://libosinfo.org/")
329 (synopsis "Operating system information database")
330 (description "libosinfo is a GObject based library API for managing
331 information about operating systems, hypervisors and the (virtual) hardware
332 devices they can support. It includes a database containing device metadata
333 and provides APIs to match/identify optimal devices for deploying an operating
334 system on a hypervisor. Via GObject Introspection, the API is available in
335 all common programming languages. Vala bindings are also provided.")
336 ;; The library files are released under LGPLv2.1 or later; the source
337 ;; files in the "tools" directory are released under GPLv2+.
338 (license (list license:lgpl2.1+ license:gpl2+))))
347 "https://linuxcontainers.org/downloads/lxc/lxc-"
351 "0p1gy553cm4mhwxi85fl6qiwz61rjmvysm8c8pd20qh62xxi3dva"))))
352 (build-system gnu-build-system)
354 `(("pkg-config" ,pkg-config)))
358 ("libseccomp" ,libseccomp)
359 ("libselinux" ,libselinux)))
362 '("--sysconfdir=/etc"
363 "--localstatedir=/var")
365 (modify-phases %standard-phases
367 (lambda* (#:key outputs #:allow-other-keys)
368 (let* ((out (assoc-ref outputs "out"))
369 (bashcompdir (string-append out "/etc/bash_completion.d")))
370 (invoke "make" "install"
371 (string-append "bashcompdir=" bashcompdir)
372 ;; Don't install files into /var and /etc.
373 "LXCPATH=/tmp/var/lib/lxc"
374 "localstatedir=/tmp/var"
375 "sysconfdir=/tmp/etc"
376 "sysconfigdir=/tmp/etc/default")))))))
377 (synopsis "Linux container tools")
378 (home-page "https://linuxcontainers.org/")
380 "LXC is a userspace interface for the Linux kernel containment features.
381 Through a powerful API and simple tools, it lets Linux users easily create and
382 manage system or application containers.")
383 (license license:lgpl2.1+)))
385 (define-public libvirt
391 (uri (string-append "https://libvirt.org/sources/libvirt-"
395 "1dy243dqaj174hcka0my7q781wf0dvyi7f9328nwnplqicnf4cd5"))))
396 (build-system gnu-build-system)
399 ;; FAIL: virfirewalltest
401 ;; FAIL: virnetsockettest
402 ;; FAIL: networkxml2firewalltest
403 ;; FAIL: nwfilterebiptablestest
404 ;; FAIL: nwfilterxml2firewalltest
405 ;; Time-out while running commandtest.
408 (list "--with-polkit"
410 "--localstatedir=/var")
412 (modify-phases %standard-phases
413 (add-after 'unpack 'fix-tests
415 (substitute* '("tests/commandtest.c"
416 "gnulib/tests/test-posix_spawn1.c"
417 "gnulib/tests/test-posix_spawn2.c")
418 (("/bin/sh") (which "sh")))
421 ;; Since the sysconfdir and localstatedir should be /etc and /var
422 ;; at runtime, we must prevent writing to them at installation
425 (invoke "make" "install"
426 "sysconfdir=/tmp/etc"
427 "localstatedir=/tmp/var")))
428 (add-after 'install 'wrap-libvirtd
429 (lambda* (#:key inputs outputs #:allow-other-keys)
430 (let ((out (assoc-ref outputs "out")))
431 (wrap-program (string-append out "/sbin/libvirtd")
432 `("PATH" = (,(string-append (assoc-ref inputs "iproute")
434 ,(string-append (assoc-ref inputs "qemu")
438 `(("libxml2" ,libxml2)
444 ("libuuid" ,util-linux)
445 ("lvm2" ,lvm2) ; for libdevmapper
448 ("cyrus-sasl" ,cyrus-sasl)
451 ("dmidecode" ,dmidecode)
453 ("ebtables" ,ebtables)
455 ("iptables" ,iptables)))
457 `(("xsltproc" ,libxslt)
459 ("pkg-config" ,pkg-config)
462 (home-page "https://libvirt.org")
463 (synopsis "Simple API for virtualization")
464 (description "Libvirt is a C toolkit to interact with the virtualization
465 capabilities of recent versions of Linux. The library aims at providing long
466 term stable C API initially for the Xen paravirtualization but should be able
467 to integrate other virtualization mechanisms if needed.")
468 (license license:lgpl2.1+)))
470 (define-public libvirt-glib
472 (name "libvirt-glib")
476 (uri (string-append "ftp://libvirt.org/libvirt/glib/"
477 "libvirt-glib-" version ".tar.gz"))
480 "0iwa5sdbii52pjpdm5j37f67sdmf0kpcky4liwhy1nf43k85i4fa"))))
481 (build-system gnu-build-system)
484 (modify-phases %standard-phases
485 (add-after 'unpack 'fix-tests
487 (substitute* "tests/test-events.c"
488 (("/bin/true") (which "true")))
491 `(("libxml2" ,libxml2)
493 ("gobject-introspection" ,gobject-introspection)
496 ("cyrus-sasl" ,cyrus-sasl)
497 ("lvm2" ,lvm2) ; for libdevmapper
498 ("libyajl" ,libyajl)))
500 `(("pkg-config" ,pkg-config)
501 ("intltool" ,intltool)
504 (home-page "https://libvirt.org")
505 (synopsis "GLib wrapper around libvirt")
506 (description "libvirt-glib wraps the libvirt library to provide a
507 high-level object-oriented API better suited for glib-based applications, via
511 @item libvirt-glib - GLib main loop integration & misc helper APIs
512 @item libvirt-gconfig - GObjects for manipulating libvirt XML documents
513 @item libvirt-gobject - GObjects for managing libvirt objects
516 (license license:lgpl2.1+)))
518 (define-public python-libvirt
520 (name "python-libvirt")
524 (uri (pypi-uri "libvirt-python" version))
527 "1ixqhxjkczl8vk9wjx4cknw4374cw5nnsacbd2s755kpd0ys7hny"))))
528 (build-system python-build-system)
531 (modify-phases %standard-phases
532 (add-after 'unpack 'patch-nosetests-path
533 (lambda* (#:key inputs #:allow-other-keys)
534 (substitute* "setup.py"
535 (("\"/usr/bin/nosetests\"")
536 (string-append "\"" (which "nosetests") "\""))
537 (("self\\.spawn\\(\\[sys\\.executable, nose\\]\\)")
538 (format #f "self.spawn([\"~a\", nose])" (which "bash"))))
541 `(("libvirt" ,libvirt)))
543 `(("python-lxml" ,python-lxml)))
545 `(("pkg-config" ,pkg-config)
546 ("python-nose" ,python-nose)))
547 (home-page "https://libvirt.org")
548 (synopsis "Python bindings to libvirt")
549 (description "This package provides Python bindings to the libvirt
550 virtualization library.")
551 (license license:lgpl2.1+)))
553 (define-public python2-libvirt
554 (package-with-python2 python-libvirt))
556 (define-public virt-manager
558 (name "virt-manager")
562 (uri (string-append "https://virt-manager.org/download/sources"
563 "/virt-manager/virt-manager-"
567 "1ardmd4sxdmd57y7qpka44gf09c1yq2g0xs074d3k1h925crv27f"))))
568 (build-system python-build-system)
571 #:use-setuptools? #f ; Uses custom distutils 'install' command.
572 ;; Some of the tests seem to require network access to install virtual
575 #:imported-modules ((guix build glib-or-gtk-build-system)
576 ,@%python-build-system-modules)
577 #:modules ((ice-9 match)
579 (guix build python-build-system)
580 ((guix build glib-or-gtk-build-system) #:prefix glib-or-gtk:)
583 (modify-phases %standard-phases
584 (add-after 'unpack 'fix-setup
585 (lambda* (#:key outputs #:allow-other-keys)
586 (substitute* "virtcli/cliconfig.py"
587 (("/usr") (assoc-ref outputs "out")))
589 (add-after 'unpack 'fix-default-uri
590 (lambda* (#:key inputs #:allow-other-keys)
591 ;; xen is not available for now - so only patch qemu
592 (substitute* "virtManager/connect.py"
593 (("/usr(/bin/qemu-system)" _ suffix)
594 (string-append (assoc-ref inputs "qemu") suffix)))
596 (add-before 'wrap 'wrap-with-GI_TYPELIB_PATH
597 (lambda* (#:key inputs outputs #:allow-other-keys)
598 (let* ((bin (string-append (assoc-ref outputs "out") "/bin"))
599 (bin-files (find-files bin ".*"))
600 (paths (map (match-lambda
601 ((output . directory)
602 (let* ((girepodir (string-append
604 "/lib/girepository-1.0")))
605 (if (file-exists? girepodir)
608 (for-each (lambda (file)
609 (format #t "wrapping ~a\n" file)
611 `("GI_TYPELIB_PATH" ":" prefix
612 ,(filter identity paths))))
615 (add-after 'install 'glib-or-gtk-compile-schemas
616 (assoc-ref glib-or-gtk:%standard-phases 'glib-or-gtk-compile-schemas))
617 (add-after 'install 'glib-or-gtk-wrap
618 (assoc-ref glib-or-gtk:%standard-phases 'glib-or-gtk-wrap)))))
624 ("libvirt-glib" ,libvirt-glib)
625 ("libosinfo" ,libosinfo)
627 ("gobject-introspection" ,gobject-introspection)
628 ("python2-libvirt" ,python2-libvirt)
629 ("python2-requests" ,python2-requests)
630 ("python2-ipaddr" ,python2-ipaddr)
631 ("python2-pycairo" ,python2-pycairo)
632 ("python2-pygobject" ,python2-pygobject)
633 ("python2-libxml2" ,python2-libxml2)
634 ("spice-gtk" ,spice-gtk)))
635 ;; virt-manager searches for qemu-img or kvm-img in the PATH.
639 `(("glib" ,glib "bin") ; glib-compile-schemas.
640 ("gtk+" ,gtk+ "bin") ; gtk-update-icon-cache
641 ("perl" ,perl) ; pod2man
642 ("intltool" ,intltool)))
643 (home-page "https://virt-manager.org/")
644 (synopsis "Manage virtual machines")
646 "The virt-manager application is a desktop user interface for managing
647 virtual machines through libvirt. It primarily targets KVM VMs, but also
648 manages Xen and LXC (Linux containers). It presents a summary view of running
649 domains, their live performance and resource utilization statistics.")
650 (license license:gpl2+)))
658 (uri (string-append "http://download.openvz.org/criu/criu-"
662 "0qrpz7pvnks34v7d8lb73flz3mb7qwnib94pdwaxh0mskn8470fq"))))
663 (build-system gnu-build-system)
665 `(#:test-target "test"
666 #:tests? #f ; tests require mounting as root
668 (list (string-append "PREFIX=" (assoc-ref %outputs "out"))
669 (string-append "LIBDIR=" (assoc-ref %outputs "out")
672 (modify-phases %standard-phases
674 (lambda* (#:key inputs #:allow-other-keys)
675 ;; The includes for libnl are located in a sub-directory.
676 (setenv "C_INCLUDE_PATH"
677 (string-append (assoc-ref inputs "libnl")
679 (getenv "C_INCLUDE_PATH")))
680 ;; Prevent xmlto from failing the install phase.
681 (substitute* "Documentation/Makefile"
683 (string-append "XMLTO:="
684 (assoc-ref inputs "xmlto")
686 " --skip-validation "
688 (assoc-ref inputs "docbook-xsl")
689 "/xml/xsl/docbook-xsl-"
690 ,(package-version docbook-xsl)
691 "/manpages/docbook.xsl")))
693 (add-before 'build 'fix-symlink
694 (lambda* (#:key inputs #:allow-other-keys)
695 ;; The file 'images/google/protobuf/descriptor.proto' points to
696 ;; /usr/include/..., which obviously does not exist.
697 (let* ((file "google/protobuf/descriptor.proto")
698 (target (string-append "images/" file))
699 (source (string-append (assoc-ref inputs "protobuf")
702 (symlink source target)
704 (add-after 'install 'wrap
705 (lambda* (#:key inputs outputs #:allow-other-keys)
706 ;; Make sure 'crit' runs with the correct PYTHONPATH.
707 (let* ((out (assoc-ref outputs "out"))
708 (path (string-append out
710 (string-take (string-take-right
711 (assoc-ref inputs "python") 5) 3)
713 (getenv "PYTHONPATH"))))
714 (wrap-program (string-append out "/bin/crit")
715 `("PYTHONPATH" ":" prefix (,path))))
718 `(("protobuf" ,protobuf)
720 ("python2-protobuf" ,python2-protobuf)
721 ("python2-ipaddr" ,python2-ipaddr)
728 `(("pkg-config" ,pkg-config)
730 ("protobuf-c" ,protobuf-c)
731 ("asciidoc" ,asciidoc)
733 ("docbook-xml" ,docbook-xml)
734 ("docbook-xsl" ,docbook-xsl)))
735 (home-page "https://criu.org")
736 (synopsis "Checkpoint and restore in user space")
737 (description "Using this tool, you can freeze a running application (or
738 part of it) and checkpoint it to a hard drive as a collection of files. You
739 can then use the files to restore and run the application from the point it
740 was frozen at. The distinctive feature of the CRIU project is that it is
741 mainly implemented in user space.")
742 ;; The project is licensed under GPLv2; files in the lib/ directory are
744 (license (list license:gpl2 license:lgpl2.1))))
746 (define-public qmpbackup
752 (uri (string-append "https://github.com/abbbi/qmpbackup/archive/"
756 "10k9mnb1yrg4gw1rvz4kw4dxc4aajl8gnjrpm3axqkg63qmxj3qn"))
757 (file-name (string-append name "-" version ".tar.gz"))))
758 (build-system python-build-system)
760 `(#:python ,python-2))
761 (home-page "https://github.com/abbbi/qmpbackup")
762 (synopsis "Backup and restore QEMU machines")
763 (description "qmpbackup is designed to create and restore full and
764 incremental backups of running QEMU virtual machines via QMP, the QEMU
766 (license license:gpl3+)))
768 (define-public lookingglass
770 (name "lookingglass")
775 (uri (string-append "https://github.com/gnif/LookingGlass/archive/"
777 (file-name (string-append name "-" version))
780 "11qwyp332l66sqksqa0z9439yi4accmbq7wjc6kikc5fimdh9wk5"))))
781 (build-system gnu-build-system)
782 (inputs `(("fontconfig" ,fontconfig)
787 ("sdl2-ttf" ,sdl2-ttf)
788 ("spice-protocol" ,spice-protocol)))
789 (native-inputs `(("libconfig" ,libconfig)
791 ("pkg-config" ,pkg-config)))
793 `(#:tests? #f ;; No tests are available.
794 #:make-flags '("CC=gcc")
795 #:phases (modify-phases %standard-phases
797 (lambda* (#:key outputs #:allow-other-keys)
801 (lambda* (#:key outputs #:allow-other-keys)
802 (install-file "bin/looking-glass-client"
803 (string-append (assoc-ref outputs "out")
806 (home-page "https://looking-glass.hostfission.com")
807 (synopsis "KVM Frame Relay (KVMFR) implementation")
808 (description "Looking Glass allows the use of a KVM (Kernel-based Virtual
809 Machine) configured for VGA PCI Pass-through without an attached physical
810 monitor, keyboard or mouse. It displays the VM's rendered contents on your main
812 ;; This package requires SSE instructions.
813 (supported-systems '("i686-linux" "x86_64-linux"))
814 (license license:gpl2+)))
819 (version "1.0.0-rc5")
823 "https://github.com/opencontainers/runc/releases/"
824 "download/v" version "/runc.tar.xz"))
827 "081avdzwnqpk368wbaihlzsypaxpj42d7699h7jgp0fks14x4103"))))
828 (build-system go-build-system)
830 '(#:import-path "github.com/opencontainers/runc"
832 ;; XXX: 20/139 tests fail due to missing /var, cgroups and apparmor in
833 ;; the build environment.
836 (modify-phases %standard-phases
838 (lambda* (#:key source import-path #:allow-other-keys)
839 ;; Unpack the tarball into 'runc' instead of 'runc-1.0.0-rc5'.
840 (let ((dest (string-append "src/" import-path)))
842 (invoke "tar" "-C" (string-append "src/" import-path)
843 "--strip-components=1"
846 (lambda* (#:key import-path #:allow-other-keys)
847 (chdir (string-append "src/" import-path))
848 ;; XXX: requires 'go-md2man'.
849 ;; (invoke "make" "man")
853 ;; (invoke "make" "localunittest")))
855 (lambda* (#:key outputs #:allow-other-keys)
856 (let ((out (assoc-ref outputs "out")))
857 (invoke "make" "install" "install-bash"
858 (string-append "PREFIX=" out))))))))
860 `(("pkg-config" ,pkg-config)))
862 `(("libseccomp" ,libseccomp)))
863 (synopsis "Open container initiative runtime")
864 (home-page "https://www.opencontainers.org/")
866 "@command{runc} is a command line client for running applications
867 packaged according to the
868 @uref{https://github.com/opencontainers/runtime-spec/blob/master/spec.md, Open
869 Container Initiative (OCI) format} and is a compliant implementation of the
870 Open Container Initiative specification.")
871 (license license:asl2.0)))
880 "https://github.com/openSUSE/umoci/releases/download/v"
881 version "/umoci.tar.xz"))
882 (file-name (string-append "umoci-" version ".tar.xz"))
885 "0hg7hs4dagj2fgymm4b4s68k1v2k2093s3jg0d94j0ixhfmyg9nd"))))
886 (build-system go-build-system)
888 '(#:import-path "github.com/openSUSE/umoci"
891 (modify-phases %standard-phases
893 (lambda* (#:key source import-path #:allow-other-keys)
894 ;; Unpack the tarball into 'umoci' instead of "runc-${version}".
895 (let ((dest (string-append "src/" import-path)))
897 (invoke "tar" "-C" (string-append "src/" import-path)
898 "--strip-components=1"
901 (lambda* (#:key import-path #:allow-other-keys)
902 (chdir (string-append "src/" import-path))
903 ;; TODO: build manpages with 'go-md2man'.
904 (invoke "make" "SHELL=bash")))
906 (lambda* (#:key outputs #:allow-other-keys)
907 (let* ((out (assoc-ref outputs "out"))
908 (bindir (string-append out "/bin")))
909 (install-file "umoci" bindir)
911 (home-page "https://umo.ci/")
912 (synopsis "Tool for modifying Open Container images")
914 "@command{umoci} is a tool that allows for high-level modification of an
915 Open Container Initiative (OCI) image layout and its tagged images.")
916 (license license:asl2.0)))
918 (define-public skopeo
925 (url "https://github.com/projectatomic/skopeo")
926 (commit (string-append "v" version))))
927 (file-name (git-file-name name version))
930 "068nwrr3nr27alravcq1sxyhdd5jjr24213vdgn1dqva3885gbi0"))))
931 (build-system go-build-system)
933 `(("pkg-config" ,pkg-config)))
935 `(("btrfs-progs" ,btrfs-progs)
937 ("libassuan" ,libassuan)
938 ("libselinux" ,libselinux)
939 ("libostree" ,libostree)
944 '(#:import-path "github.com/projectatomic/skopeo"
947 (modify-phases %standard-phases
949 (lambda* (#:key import-path #:allow-other-keys)
950 (chdir (string-append "src/" import-path))
951 ;; TODO: build manpages with 'go-md2man'.
952 (invoke "make" "binary-local")))
954 (lambda* (#:key outputs #:allow-other-keys)
955 (let ((out (assoc-ref outputs "out")))
956 (invoke "make" "install-binary" "install-completions"
957 (string-append "PREFIX=" out))))))))
958 (home-page "https://github.com/projectatomic/skopeo")
959 (synopsis "Interact with container images and container image registries")
961 "@command{skopeo} is a command line utility providing various operations
962 with container images and container image registries. It can:
965 @item Copy container images between various containers image stores,
966 converting them as necessary.
968 @item Convert a Docker schema 2 or schema 1 container image to an OCI image.
970 @item Inspect a repository on a container registry without needlessly pulling
973 @item Sign and verify container images.
975 @item Delete container images from a remote container registry.
978 (license license:asl2.0)))
980 (define-public python-vagrant
982 (name "python-vagrant")
987 (uri (pypi-uri "python-vagrant" version))
990 "1ikrh6canhcxg5y7pzmkcnnydikppv7s6sm9prfx90nk0ac8m6mg"))))
991 (build-system python-build-system)
993 '(#:tests? #f)) ; tests involve running vagrant.
994 (home-page "https://github.com/todddeluca/python-vagrant")
995 (synopsis "Python bindings for Vagrant")
997 "Python-vagrant is a Python module that provides a thin wrapper around the
998 @code{vagrant} command line executable, allowing programmatic control of Vagrant
1000 (license license:expat)))