| 1 | |
| 2 | |
| 3 | |
| 4 | |
| 5 | |
| 6 | |
| 7 | |
| 8 | |
| 9 | |
| 10 | |
| 11 | |
| 12 | |
| 13 | |
| 14 | |
| 15 | |
| 16 | |
| 17 | |
| 18 | |
| 19 | |
| 20 | |
| 21 | |
| 22 | |
| 23 | |
| 24 | |
| 25 | |
| 26 | |
| 27 | |
| 28 | |
| 29 | |
| 30 | |
| 31 | |
| 32 | |
| 33 | |
| 34 | |
| 35 | |
| 36 | |
| 37 | |
| 38 | |
| 39 | |
| 40 | |
| 41 | |
| 42 | |
| 43 | |
| 44 | |
| 45 | |
| 46 | |
| 47 | |
| 48 | |
| 49 | |
| 50 | |
| 51 | |
| 52 | |
| 53 | |
| 54 | |
| 55 | |
| 56 | |
| 57 | |
| 58 | |
| 59 | |
| 60 | |
| 61 | |
| 62 | |
| 63 |
|
| 64 | (define-module (gnu packages virtualization)
|
| 65 | #:use-module (gnu packages)
|
| 66 | #:use-module (gnu packages acl)
|
| 67 | #:use-module (gnu packages admin)
|
| 68 | #:use-module (gnu packages apparmor)
|
| 69 | #:use-module (gnu packages assembly)
|
| 70 | #:use-module (gnu packages attr)
|
| 71 | #:use-module (gnu packages apparmor)
|
| 72 | #:use-module (gnu packages augeas)
|
| 73 | #:use-module (gnu packages autotools)
|
| 74 | #:use-module (gnu packages backup)
|
| 75 | #:use-module (gnu packages base)
|
| 76 | #:use-module (gnu packages bash)
|
| 77 | #:use-module (gnu packages bison)
|
| 78 | #:use-module (gnu packages bootloaders)
|
| 79 | #:use-module (gnu packages build-tools)
|
| 80 | #:use-module (gnu packages cdrom)
|
| 81 | #:use-module (gnu packages check)
|
| 82 | #:use-module (gnu packages cluster)
|
| 83 | #:use-module (gnu packages cmake)
|
| 84 | #:use-module (gnu packages compression)
|
| 85 | #:use-module (gnu packages containers)
|
| 86 | #:use-module (gnu packages cpio)
|
| 87 | #:use-module (gnu packages cross-base)
|
| 88 | #:use-module (gnu packages crypto)
|
| 89 | #:use-module (gnu packages cryptsetup)
|
| 90 | #:use-module (gnu packages curl)
|
| 91 | #:use-module (gnu packages cyrus-sasl)
|
| 92 | #:use-module (gnu packages dbm)
|
| 93 | #:use-module (gnu packages debian)
|
| 94 | #:use-module (gnu packages disk)
|
| 95 | #:use-module (gnu packages dns)
|
| 96 | #:use-module (gnu packages docbook)
|
| 97 | #:use-module (gnu packages documentation)
|
| 98 | #:use-module (gnu packages engineering)
|
| 99 | #:use-module (gnu packages figlet)
|
| 100 | #:use-module (gnu packages file)
|
| 101 | #:use-module (gnu packages firmware)
|
| 102 | #:use-module (gnu packages compiler-tools)
|
| 103 | #:use-module (gnu packages fonts)
|
| 104 | #:use-module (gnu packages fontutils)
|
| 105 | #:use-module (gnu packages freedesktop)
|
| 106 | #:use-module (gnu packages gcc)
|
| 107 | #:use-module (gnu packages gettext)
|
| 108 | #:use-module (gnu packages gl)
|
| 109 | #:use-module (gnu packages glib)
|
| 110 | #:use-module (gnu packages gnome)
|
| 111 | #:use-module (gnu packages gnupg)
|
| 112 | #:use-module (gnu packages golang)
|
| 113 | #:use-module (gnu packages golang-build)
|
| 114 | #:use-module (gnu packages golang-compression)
|
| 115 | #:use-module (gnu packages golang-check)
|
| 116 | #:use-module (gnu packages golang-crypto)
|
| 117 | #:use-module (gnu packages golang-web)
|
| 118 | #:use-module (gnu packages golang-xyz)
|
| 119 | #:use-module (gnu packages gperf)
|
| 120 | #:use-module (gnu packages graphviz)
|
| 121 | #:use-module (gnu packages gtk)
|
| 122 | #:use-module (gnu packages guile)
|
| 123 | #:use-module (gnu packages java)
|
| 124 | #:use-module (gnu packages haskell)
|
| 125 | #:use-module (gnu packages haskell-apps)
|
| 126 | #:use-module (gnu packages haskell-check)
|
| 127 | #:use-module (gnu packages haskell-crypto)
|
| 128 | #:use-module (gnu packages haskell-web)
|
| 129 | #:use-module (gnu packages haskell-xyz)
|
| 130 | #:use-module (gnu packages high-availability)
|
| 131 | #:use-module (gnu packages image)
|
| 132 | #:use-module (gnu packages libbsd)
|
| 133 | #:use-module (gnu packages libusb)
|
| 134 | #:use-module (gnu packages linux)
|
| 135 | #:use-module (gnu packages llvm)
|
| 136 | #:use-module (gnu packages lua)
|
| 137 | #:use-module (gnu packages m4)
|
| 138 | #:use-module (gnu packages man)
|
| 139 | #:use-module (gnu packages multiprecision)
|
| 140 | #:use-module (gnu packages ncurses)
|
| 141 | #:use-module (gnu packages nettle)
|
| 142 | #:use-module (gnu packages networking)
|
| 143 | #:use-module (gnu packages ocaml)
|
| 144 | #:use-module (gnu packages onc-rpc)
|
| 145 | #:use-module (gnu packages package-management)
|
| 146 | #:use-module (gnu packages pciutils)
|
| 147 | #:use-module (gnu packages pcre)
|
| 148 | #:use-module (gnu packages perl)
|
| 149 | #:use-module (gnu packages pkg-config)
|
| 150 | #:use-module (gnu packages polkit)
|
| 151 | #:use-module (gnu packages protobuf)
|
| 152 | #:use-module (gnu packages pulseaudio)
|
| 153 | #:use-module (gnu packages python)
|
| 154 | #:use-module (gnu packages python-build)
|
| 155 | #:use-module (gnu packages python-check)
|
| 156 | #:use-module (gnu packages python-crypto)
|
| 157 | #:use-module (gnu packages python-web)
|
| 158 | #:use-module (gnu packages python-xyz)
|
| 159 | #:use-module (gnu packages readline)
|
| 160 | #:use-module (gnu packages ruby)
|
| 161 | #:use-module (gnu packages ruby-check)
|
| 162 | #:use-module (gnu packages ruby-xyz)
|
| 163 | #:use-module (gnu packages rust)
|
| 164 | #:use-module (gnu packages rust-apps)
|
| 165 | #:use-module (gnu packages rsync)
|
| 166 | #:use-module (gnu packages sdl)
|
| 167 | #:use-module (gnu packages selinux)
|
| 168 | #:use-module (gnu packages sphinx)
|
| 169 | #:use-module (gnu packages spice)
|
| 170 | #:use-module (gnu packages ssh)
|
| 171 | #:use-module (gnu packages tcl)
|
| 172 | #:use-module (gnu packages texinfo)
|
| 173 | #:use-module (gnu packages textutils)
|
| 174 | #:use-module (gnu packages tls)
|
| 175 | #:use-module (gnu packages web)
|
| 176 | #:use-module (gnu packages wget)
|
| 177 | #:use-module (gnu packages vnc)
|
| 178 | #:use-module (gnu packages wxwidgets)
|
| 179 | #:use-module (gnu packages xdisorg)
|
| 180 | #:use-module (gnu packages xml)
|
| 181 | #:use-module (gnu packages xorg)
|
| 182 | #:use-module ((guix licenses) #:prefix license:)
|
| 183 | #:use-module (guix build-system cargo)
|
| 184 | #:use-module (guix build-system cmake)
|
| 185 | #:use-module (guix build-system gnu)
|
| 186 | #:use-module (guix build-system go)
|
| 187 | #:use-module (guix build-system haskell)
|
| 188 | #:use-module (guix build-system meson)
|
| 189 | #:use-module (guix build-system pyproject)
|
| 190 | #:use-module (guix build-system ruby)
|
| 191 | #:use-module (guix build-system trivial)
|
| 192 | #:use-module (guix deprecation)
|
| 193 | #:use-module (guix download)
|
| 194 | #:use-module (guix gexp)
|
| 195 | #:use-module (guix git-download)
|
| 196 | #:use-module (guix packages)
|
| 197 | #:use-module (guix modules)
|
| 198 | #:use-module (guix utils)
|
| 199 | #:use-module (srfi srfi-1)
|
| 200 | #:use-module (srfi srfi-26)
|
| 201 | #:use-module (ice-9 match))
|
| 202 |
|
| 203 | (define-public qemu
|
| 204 | (package
|
| 205 | (name "qemu")
|
| 206 | |
| 207 | |
| 208 | |
| 209 | (version "10.2.1")
|
| 210 | (source
|
| 211 | (origin
|
| 212 | (method url-fetch)
|
| 213 | (uri (string-append "https://download.qemu.org/qemu-"
|
| 214 | version ".tar.xz"))
|
| 215 | (sha256
|
| 216 | (base32 "1qf9j6cnh9ycs33dmrm1bas3wafkdh7w5yzz1dilvj72v1vp8wd3"))
|
| 217 | (patches (search-patches "qemu-build-info-manual.patch"
|
| 218 | "qemu-fix-agent-paths.patch"
|
| 219 | "qemu-fix-test-virtio-version.patch"))
|
| 220 | (modules '((guix build utils)))
|
| 221 | (snippet
|
| 222 | '(begin
|
| 223 | |
| 224 | (delete-file-recursively "subprojects/packagecache")
|
| 225 | (mkdir-p "subprojects/packagecache")
|
| 226 | |
| 227 | (with-directory-excursion "pc-bios"
|
| 228 | |
| 229 | (for-each delete-file (find-files "." "^(bios|vgabios).*\\.bin$"))
|
| 230 | |
| 231 | |
| 232 | (delete-file "openbios-ppc")
|
| 233 | |
| 234 | |
| 235 | (delete-file "opensbi-riscv64-generic-fw_dynamic.bin")
|
| 236 | |
| 237 | (for-each delete-file (find-files "." "^(efi|pxe)-.*\\.rom$")))
|
| 238 | |
| 239 | (for-each delete-file-recursively
|
| 240 | '("roms/u-boot/scripts/dtc"
|
| 241 | "roms/ipxe"
|
| 242 | "roms/openbios"
|
| 243 | "roms/opensbi"
|
| 244 | "roms/seabios"))))))
|
| 245 | (outputs '("out" "static" "doc")) |
| 246 | (build-system gnu-build-system)
|
| 247 | (arguments
|
| 248 | (list
|
| 249 | |
| 250 | |
| 251 | #:tests? (or (%current-target-system)
|
| 252 | (not (string=? "i686-linux" (%current-system))))
|
| 253 | #:parallel-tests? (not (or (target-arm32?)
|
| 254 | (target-riscv64?)))
|
| 255 | #:configure-flags
|
| 256 | #~(let ((gcc (search-input-file %build-inputs "/bin/gcc"))
|
| 257 | (openbios (search-input-file %build-inputs
|
| 258 | "share/qemu/openbios-ppc"))
|
| 259 | (opensbi (search-input-file
|
| 260 | %build-inputs
|
| 261 | "share/qemu/opensbi-riscv64-generic-fw_dynamic.bin"))
|
| 262 | (seabios (search-input-file %build-inputs
|
| 263 | "share/qemu/bios.bin"))
|
| 264 | (ipxe
|
| 265 | #$@(if (this-package-input "ipxe-qemu")
|
| 266 | #~((search-input-file %build-inputs
|
| 267 | "share/qemu/pxe-virtio.rom"))
|
| 268 | #~((string-append #$output "/share/qemu"))))
|
| 269 | (out #$output))
|
| 270 | (cons* (string-append "--cc=" gcc)
|
| 271 | |
| 272 | (string-append "--host-cc=" gcc)
|
| 273 | (string-append "--prefix=" out)
|
| 274 | "--sysconfdir=/etc"
|
| 275 | "--enable-fdt=system"
|
| 276 | (string-append "--firmwarepath=" out "/share/qemu:"
|
| 277 | (dirname seabios) ":"
|
| 278 | (dirname ipxe) ":"
|
| 279 | (dirname openbios) ":"
|
| 280 | (dirname opensbi))
|
| 281 | (string-append "--smbd=" out "/libexec/samba-wrapper")
|
| 282 | "--disable-debug-info" |
| 283 | |
| 284 | (string-append "--extra-ldflags=-lrt")
|
| 285 | #$@(if (this-package-native-input "rust")
|
| 286 | #~((list "--enable-rust"))
|
| 287 | #~((list)))))
|
| 288 | |
| 289 | #:make-flags #~'("V=1")
|
| 290 | #:modules `((srfi srfi-1)
|
| 291 | (srfi srfi-26)
|
| 292 | (ice-9 ftw)
|
| 293 | (ice-9 match)
|
| 294 | ((guix build cargo-build-system) #:prefix cargo:)
|
| 295 | ,@%default-gnu-modules)
|
| 296 | #:imported-modules `(,@%cargo-build-system-modules
|
| 297 | ,@%default-gnu-imported-modules)
|
| 298 | #:phases
|
| 299 | #~(modify-phases %standard-phases
|
| 300 | |
| 301 | |
| 302 | (add-after 'unpack 'replace-firmwares
|
| 303 | (lambda* (#:key inputs #:allow-other-keys)
|
| 304 | (let* ((seabios (dirname (search-input-file
|
| 305 | inputs "share/qemu/bios.bin")))
|
| 306 | (seabios-firmwares (find-files seabios "\\.bin$"))
|
| 307 | (ipxe
|
| 308 | #$@(if (this-package-input "ipxe-qemu")
|
| 309 | #~((dirname (search-input-file
|
| 310 | inputs "share/qemu/pxe-virtio.rom")))
|
| 311 | #~((string-append #$output "/share/qemu"))))
|
| 312 | (ipxe-firmwares (find-files ipxe "\\.rom$"))
|
| 313 | (openbios (search-input-file
|
| 314 | inputs "share/qemu/openbios-ppc"))
|
| 315 | (opensbi-riscv64
|
| 316 | (search-input-file
|
| 317 | inputs
|
| 318 | "share/qemu/opensbi-riscv64-generic-fw_dynamic.bin"))
|
| 319 | (allowed-differences
|
| 320 | |
| 321 | |
| 322 | '("tests/data/acpi/x86/pc/SSDT.dimmpxm"
|
| 323 | "tests/data/acpi/x86/pc/DSDT.dimmpxm"
|
| 324 | "tests/data/acpi/x86/pc/ERST.acpierst"
|
| 325 | "tests/data/acpi/x86/q35/ERST.acpierst"
|
| 326 | "tests/data/acpi/x86/q35/DSDT.cxl"))
|
| 327 | (allowed-differences-whitelist
|
| 328 | (open-file "tests/qtest/bios-tables-test-allowed-diff.h"
|
| 329 | "a")))
|
| 330 | (with-directory-excursion "pc-bios"
|
| 331 | (for-each (lambda (file)
|
| 332 | (symlink file (basename file)))
|
| 333 | (append seabios-firmwares ipxe-firmwares
|
| 334 | (list openbios opensbi-riscv64))))
|
| 335 | (for-each (lambda (file)
|
| 336 | (format allowed-differences-whitelist
|
| 337 | "\"~a\",~%" file))
|
| 338 | allowed-differences)
|
| 339 | (close-port allowed-differences-whitelist))))
|
| 340 | #$@(if (this-package-native-input "rust")
|
| 341 | #~((add-after 'unpack 'prepare-rust-crates
|
| 342 | (lambda args
|
| 343 | (apply (assoc-ref cargo:%standard-phases
|
| 344 | 'prepare-rust-crates)
|
| 345 | args)
|
| 346 | |
| 347 | (substitute* (find-files "subprojects" "-rs\\.wrap$")
|
| 348 | (("source_url = (.*)" _ url)
|
| 349 | (let ((split-url (string-split url #\/)))
|
| 350 | (string-append
|
| 351 | "source_url = file:///tmp/rust-crates/rust-"
|
| 352 | (list-ref split-url 6) "-"
|
| 353 | (list-ref split-url 7) ".tar.gz\n"))))
|
| 354 | |
| 355 | (for-each
|
| 356 | (lambda (wrapper)
|
| 357 | (invoke "meson" "subprojects" "download"
|
| 358 | (string-drop-right wrapper 5)))
|
| 359 | (scandir "subprojects"
|
| 360 | (lambda (file)
|
| 361 | (string-suffix? "-rs.wrap" file)))))))
|
| 362 | #~())
|
| 363 | |
| 364 | |
| 365 | #$@(if (not (this-package-input "ipxe-qemu"))
|
| 366 | #~((add-after 'unpack 'dont-require-ipxe-firmware
|
| 367 | (lambda _
|
| 368 | (substitute* "pc-bios/meson.build"
|
| 369 | ((".*(pxe|efi)-.*") ""))
|
| 370 | |
| 371 | |
| 372 | |
| 373 | (substitute* "tests/meson.build"
|
| 374 | (("subdir.*qtest.*") ""))
|
| 375 | |
| 376 | (substitute* "tests/functional/ppc/meson.build"
|
| 377 | ((".*'74xx',.*") "")))))
|
| 378 | #~())
|
| 379 | (add-after 'unpack 'extend-test-time-outs
|
| 380 | (lambda _
|
| 381 | |
| 382 | (substitute* (cons* "tests/qemu-iotests/common.qemu"
|
| 383 | (find-files "tests/qemu-iotests" "^[0-9]+$"))
|
| 384 | (("QEMU_COMM_TIMEOUT=[0-9]+" match)
|
| 385 | (string-append match "9")))))
|
| 386 | (add-after 'unpack 'disable-unusable-tests
|
| 387 | (lambda _
|
| 388 | (substitute* "tests/unit/meson.build"
|
| 389 | |
| 390 | |
| 391 | (("tests.*test-qga.*$" all)
|
| 392 | (string-append "# " all))
|
| 393 | |
| 394 | |
| 395 | ((".*'test-char':.*" all)
|
| 396 | (string-append "# " all)))
|
| 397 | (substitute* "tests/qtest/meson.build"
|
| 398 | |
| 399 | |
| 400 | (("'arm-cpu-features',") "")
|
| 401 | |
| 402 | |
| 403 | (("\\['ahci-test'\\]") "[]"))
|
| 404 | |
| 405 | |
| 406 | (delete-file "tests/qemu-iotests/tests/copy-before-write")
|
| 407 | |
| 408 | |
| 409 | (delete-file "tests/qemu-iotests/161")))
|
| 410 | #$@(cond
|
| 411 | ((target-riscv64?)
|
| 412 | #~((add-after 'unpack 'disable-some-tests
|
| 413 | (lambda _
|
| 414 | |
| 415 | (substitute* "tests/unit/meson.build"
|
| 416 | (("test-crypto-tlssession': 90")
|
| 417 | "test-crypto-tlssession': 180"))
|
| 418 |
|
| 419 | |
| 420 | |
| 421 | (delete-file "tests/qemu-iotests/040")
|
| 422 | (delete-file "tests/qemu-iotests/041")
|
| 423 | (delete-file "tests/qemu-iotests/256")
|
| 424 |
|
| 425 | |
| 426 | (delete-file "tests/qemu-iotests/127")
|
| 427 | (delete-file "tests/qemu-iotests/267")
|
| 428 |
|
| 429 | |
| 430 | (delete-file "tests/qemu-iotests/tests/iothreads-stream")))))
|
| 431 | ((target-arm32?)
|
| 432 | #~((add-after 'unpack 'disable-some-tests
|
| 433 | (lambda _
|
| 434 | |
| 435 | (substitute* "tests/unit/meson.build"
|
| 436 | (("test-crypto-tlssession': 90")
|
| 437 | "test-crypto-tlssession': 180"))
|
| 438 |
|
| 439 | |
| 440 | (substitute* "tests/qtest/meson.build"
|
| 441 | ((".*qtests_aspeed :.*") ""))))))
|
| 442 | ((target-aarch64?)
|
| 443 | #~((add-after 'unpack 'disable-some-tests
|
| 444 | (lambda _
|
| 445 | |
| 446 | (let ((patch #$(local-file
|
| 447 | (search-patch
|
| 448 | "qemu-disable-aarch64-migration-test.patch"))))
|
| 449 | (invoke "patch" "--force" "-p1" "-i" patch))))))
|
| 450 | (else '()))
|
| 451 | (add-after 'patch-source-shebangs 'patch-embedded-shebangs
|
| 452 | (lambda* (#:key native-inputs inputs #:allow-other-keys)
|
| 453 | |
| 454 | |
| 455 | (substitute* '("block/cloop.c"
|
| 456 | "migration/exec.c"
|
| 457 | "migration/migration.c"
|
| 458 | "net/tap.c"
|
| 459 | "util/envlist.c")
|
| 460 | (("/bin/sh")
|
| 461 | (search-input-file inputs "/bin/sh")))
|
| 462 | |
| 463 | (substitute* '("tests/qtest/libqtest.c"
|
| 464 | "tests/qtest/vhost-user-blk-test.c")
|
| 465 | (("/bin/sh")
|
| 466 | (search-input-file (or native-inputs inputs) "/bin/sh")))
|
| 467 | (substitute* "tests/qemu-iotests/testenv.py"
|
| 468 | (("#!/usr/bin/env python3")
|
| 469 | (string-append "#!" (search-input-file (or native-inputs inputs)
|
| 470 | "/bin/python3"))))))
|
| 471 | (add-before 'configure 'fix-optionrom-makefile
|
| 472 | (lambda _
|
| 473 | |
| 474 | |
| 475 | |
| 476 | (substitute* "pc-bios/optionrom/Makefile"
|
| 477 | (("^VPATH = \\$\\(SRC_DIR\\)")
|
| 478 | "VPATH = $(SRC_DIR):$(TOPSRC_DIR)/pc-bios"))))
|
| 479 | |
| 480 | (replace 'configure
|
| 481 | (lambda* (#:key inputs configure-flags #:allow-other-keys)
|
| 482 | |
| 483 | |
| 484 | (setenv "SHELL" (which "bash"))
|
| 485 | |
| 486 | |
| 487 | |
| 488 | (substitute* "configure"
|
| 489 | (("#!/bin/sh")
|
| 490 | (string-append "#!" (which "sh"))))
|
| 491 | (mkdir-p "b/qemu")
|
| 492 | (chdir "b/qemu")
|
| 493 | (apply invoke "../../configure" configure-flags)))
|
| 494 |
|
| 495 | |
| 496 | (add-after 'configure 'configure-user-static
|
| 497 | (lambda* (#:key inputs outputs #:allow-other-keys)
|
| 498 | (let* ((gcc (search-input-file inputs "/bin/gcc"))
|
| 499 | |
| 500 | |
| 501 | |
| 502 | |
| 503 | (configure-flags (list (string-append "--cc=" gcc)
|
| 504 | (string-append "--host-cc=" gcc)
|
| 505 | "--sysconfdir=/etc"
|
| 506 | "--disable-debug-info"))
|
| 507 | (static (assoc-ref outputs "static")))
|
| 508 | (mkdir-p "../user-static")
|
| 509 | (with-directory-excursion "../user-static"
|
| 510 | (apply invoke "../../configure"
|
| 511 | "--static"
|
| 512 | "--disable-docs" |
| 513 | "--disable-system"
|
| 514 | "--enable-linux-user"
|
| 515 | (string-append "--prefix=" static)
|
| 516 | configure-flags)))))
|
| 517 | (add-after 'build 'build-user-static
|
| 518 | (lambda args
|
| 519 | (with-directory-excursion "../user-static"
|
| 520 | (apply (assoc-ref %standard-phases 'build) args))))
|
| 521 | (add-after 'install 'install-plugins
|
| 522 | (lambda* (#:key outputs #:allow-other-keys)
|
| 523 | (let ((plugin-dir (string-append
|
| 524 | (assoc-ref outputs "out")
|
| 525 | "/lib/qemu/plugins")))
|
| 526 | (mkdir-p plugin-dir)
|
| 527 | (with-directory-excursion "contrib/plugins"
|
| 528 | (for-each
|
| 529 | (cut install-file <> plugin-dir)
|
| 530 | (find-files "." "\\.so$"))))))
|
| 531 | (add-after 'install 'install-user-static
|
| 532 | (lambda* (#:key outputs #:allow-other-keys)
|
| 533 | (let ((static-bin (string-append
|
| 534 | (assoc-ref outputs "static") |
| 535 | "/bin")))
|
| 536 | (with-directory-excursion "../user-static"
|
| 537 | (for-each
|
| 538 | (cut install-file <> static-bin)
|
| 539 | (find-files "."
|
| 540 | (lambda (name stat)
|
| 541 | |
| 542 | (and (string-prefix? "./qemu-" name)
|
| 543 | (eq? 'regular (stat:type stat))
|
| 544 | (logtest #o100 (stat:perms stat))))))))))
|
| 545 | (add-before 'check 'set-SOCK_DIR
|
| 546 | (lambda _
|
| 547 | |
| 548 | |
| 549 | |
| 550 | |
| 551 | |
| 552 | (setenv "SOCK_DIR" "/tmp")))
|
| 553 | (add-after 'install 'delete-firmwares
|
| 554 | (lambda _
|
| 555 | |
| 556 | |
| 557 | |
| 558 | (with-directory-excursion (string-append #$output "/share/qemu")
|
| 559 | (for-each delete-file
|
| 560 | (append
|
| 561 | '("openbios-ppc"
|
| 562 | "opensbi-riscv64-generic-fw_dynamic.bin")
|
| 563 | (find-files "." "^(vga)?bios(-[a-z0-9-]+)?\\.bin$")
|
| 564 | (find-files "." "^(efi|pxe)-.*\\.rom$"))))))
|
| 565 | |
| 566 | |
| 567 | |
| 568 | (add-after 'install 'create-samba-wrapper
|
| 569 | (lambda* (#:key inputs #:allow-other-keys)
|
| 570 | (let ((libexec (string-append #$output "/libexec")))
|
| 571 | (call-with-output-file "samba-wrapper"
|
| 572 | (lambda (port)
|
| 573 | (format port "#!/bin/sh
|
| 574 | exec smbd $@")))
|
| 575 | (chmod "samba-wrapper" #o755)
|
| 576 | (install-file "samba-wrapper" libexec))))
|
| 577 | (add-after 'install 'move-html-doc
|
| 578 | (lambda* (#:key inputs outputs #:allow-other-keys)
|
| 579 | (let* ((out #$output)
|
| 580 | (doc (assoc-ref outputs "doc")) |
| 581 | (qemu-doc (string-append doc "/share/doc/qemu-"
|
| 582 | #$(package-version this-package))))
|
| 583 | (mkdir-p qemu-doc)
|
| 584 | (rename-file (string-append out "/share/doc/qemu")
|
| 585 | (string-append qemu-doc "/html"))))))))
|
| 586 | (inputs
|
| 587 | (append
|
| 588 | (if (supported-package? ipxe-qemu)
|
| 589 | (list ipxe-qemu)
|
| 590 | '())
|
| 591 | (list alsa-lib
|
| 592 | bash-minimal
|
| 593 | capstone
|
| 594 | dtc
|
| 595 | glib
|
| 596 | gnutls |
| 597 | gtk+
|
| 598 | libaio
|
| 599 | libcacard |
| 600 | attr libcap-ng |
| 601 | libdrm
|
| 602 | libepoxy
|
| 603 | libjpeg-turbo
|
| 604 | libpng
|
| 605 | libseccomp
|
| 606 | libslirp
|
| 607 | liburing
|
| 608 | libusb |
| 609 | mesa
|
| 610 | ncurses
|
| 611 | openbios-qemu-ppc
|
| 612 | opensbi-qemu
|
| 613 | pipewire |
| 614 | pixman
|
| 615 | pulseaudio
|
| 616 | sdl2
|
| 617 | seabios-qemu
|
| 618 | spice
|
| 619 | usbredir
|
| 620 | util-linux
|
| 621 | vde2
|
| 622 | virglrenderer
|
| 623 | zlib
|
| 624 | `(,zstd "lib"))))
|
| 625 | (native-inputs
|
| 626 | (append
|
| 627 | |
| 628 | (if #f |
| 629 | (append
|
| 630 | (cons* rust
|
| 631 | rust-bindgen-cli
|
| 632 | (cargo-inputs 'qemu))
|
| 633 | (or (and=> (%current-target-system)
|
| 634 | (compose list make-rust-sysroot))
|
| 635 | '()))
|
| 636 | '())
|
| 637 | |
| 638 | |
| 639 | (list acpica
|
| 640 | bison
|
| 641 | flex
|
| 642 | gettext-minimal
|
| 643 | `(,glib "bin") |
| 644 | meson
|
| 645 | ninja
|
| 646 | perl
|
| 647 | pkg-config
|
| 648 | python-wrapper
|
| 649 | python-sphinx
|
| 650 | python-sphinx-rtd-theme
|
| 651 | python-tomli
|
| 652 | texinfo
|
| 653 | |
| 654 | |
| 655 | `(,glib "static")
|
| 656 | `(,pcre2 "static")
|
| 657 | `(,zlib "static"))))
|
| 658 | (home-page "https://www.qemu.org")
|
| 659 | (synopsis "Machine emulator and virtualizer")
|
| 660 | (description
|
| 661 | "QEMU is a generic machine emulator and virtualizer.
|
| 662 |
|
| 663 | When used as a machine emulator, QEMU can run OSes and programs made for one
|
| 664 | machine (e.g. an ARM board) on a different machine---e.g., your own PC. By
|
| 665 | using dynamic translation, it achieves very good performance.
|
| 666 |
|
| 667 | When used as a virtualizer, QEMU achieves near native performances by
|
| 668 | executing the guest code directly on the host CPU. QEMU supports
|
| 669 | virtualization when executing under the Xen hypervisor or using
|
| 670 | the KVM kernel module in Linux. When using KVM, QEMU can virtualize x86,
|
| 671 | server and embedded PowerPC, and S390 guests.")
|
| 672 |
|
| 673 | |
| 674 | (license license:gpl2)
|
| 675 |
|
| 676 | |
| 677 | (supported-systems (fold delete %supported-systems
|
| 678 | '("mips64el-linux" "i586-gnu" "x86_64-gnu")))))
|
| 679 |
|
| 680 | (define-public qemu-minimal
|
| 681 | |
| 682 | (package/inherit qemu
|
| 683 | (name "qemu-minimal")
|
| 684 | (outputs '("out"))
|
| 685 | (synopsis
|
| 686 | "Machine emulator and virtualizer (without GUI or docs) for the host architecture")
|
| 687 | (arguments
|
| 688 | (substitute-keyword-arguments arguments
|
| 689 | ((#:configure-flags configure-flags #~'())
|
| 690 | |
| 691 | (let* ((system (or (%current-target-system)
|
| 692 | (%current-system)))
|
| 693 | (target-list-arg
|
| 694 | (match system
|
| 695 | ((? (cut string-prefix? "i686" <>))
|
| 696 | "--target-list=i386-softmmu")
|
| 697 | ((? (cut string-prefix? "x86_64" <>))
|
| 698 | "--target-list=i386-softmmu,x86_64-softmmu")
|
| 699 | ((? (cut string-prefix? "mips64" <>))
|
| 700 | (string-append "--target-list=mips-softmmu,mipsel-softmmu,"
|
| 701 | "mips64-softmmu,mips64el-softmmu"))
|
| 702 | ((? (cut string-prefix? "mips" <>))
|
| 703 | "--target-list=mips-softmmu,mipsel-softmmu")
|
| 704 | ((? (cut string-prefix? "aarch64" <>))
|
| 705 | "--target-list=arm-softmmu,aarch64-softmmu")
|
| 706 | ((? (cut string-prefix? "arm" <>))
|
| 707 | "--target-list=arm-softmmu")
|
| 708 | ((? (cut string-prefix? "alpha" <>))
|
| 709 | "--target-list=alpha-softmmu")
|
| 710 | ((? (cut string-prefix? "powerpc64" <>))
|
| 711 | "--target-list=ppc-softmmu,ppc64-softmmu")
|
| 712 | ((? (cut string-prefix? "powerpc" <>))
|
| 713 | "--target-list=ppc-softmmu")
|
| 714 | ((? (cut string-prefix? "s390" <>))
|
| 715 | "--target-list=s390x-softmmu")
|
| 716 | ((? (cut string-prefix? "riscv" <>))
|
| 717 | "--target-list=riscv32-softmmu,riscv64-softmmu")
|
| 718 | (else |
| 719 | '()))))
|
| 720 | #~(cons #$target-list-arg #$configure-flags)))
|
| 721 | ((#:phases phases #~'%standard-phases)
|
| 722 | #~(modify-phases #$phases
|
| 723 | (delete 'configure-user-static)
|
| 724 | (delete 'build-user-static)
|
| 725 | (delete 'install-user-static)
|
| 726 | (delete 'move-html-doc)))))
|
| 727 |
|
| 728 | |
| 729 | (native-inputs (filter (lambda (input)
|
| 730 | (match input
|
| 731 | |
| 732 | |
| 733 | |
| 734 | ((label package output)
|
| 735 | (not (string=? "static" output)))
|
| 736 | (_ input)))
|
| 737 | (modify-inputs native-inputs
|
| 738 | (delete "gettext-minimal"
|
| 739 | "python-sphinx"
|
| 740 | "python-sphinx-rtd-theme"))))
|
| 741 | (inputs (modify-inputs inputs
|
| 742 | (delete "libusb"
|
| 743 | "mesa"
|
| 744 | "sdl2"
|
| 745 | "spice"
|
| 746 | "virglrenderer"
|
| 747 | "gtk+"
|
| 748 | "usbredir"
|
| 749 | "libdrm"
|
| 750 | "libepoxy"
|
| 751 | "pipewire"
|
| 752 | "pulseaudio"
|
| 753 | "vde2"
|
| 754 | "libcacard")))))
|
| 755 |
|
| 756 | (define (system->qemu-target system)
|
| 757 | (cond
|
| 758 | ((string-prefix? "i686" system)
|
| 759 | "qemu-system-i386")
|
| 760 | ((string-prefix? "arm" system)
|
| 761 | "qemu-system-arm")
|
| 762 | (else
|
| 763 | (string-append "qemu-system-" (match (string-split system #\-)
|
| 764 | ((arch kernel) arch)
|
| 765 | (_ system))))))
|
| 766 |
|
| 767 | (define-public libx86emu
|
| 768 | (package
|
| 769 | (name "libx86emu")
|
| 770 | (version "3.5")
|
| 771 | (home-page "https://github.com/wfeldt/libx86emu")
|
| 772 | (source (origin
|
| 773 | (method git-fetch)
|
| 774 | (uri (git-reference
|
| 775 | (url home-page)
|
| 776 | (commit version)))
|
| 777 | (file-name (git-file-name name version))
|
| 778 | (sha256
|
| 779 | (base32 "11nj3y7maz9ch15b1c2b69gd8d7mpaha377zpdbvfsmg5w9zz93l"))
|
| 780 | (modules '((guix build utils)))
|
| 781 | (snippet `(begin
|
| 782 | |
| 783 | (delete-file "git2log")
|
| 784 | |
| 785 | (substitute* "Makefile"
|
| 786 | (("GIT2LOG.*=.*$") "")
|
| 787 | (("GITDEPS.*=.*$") "")
|
| 788 | (("BRANCH.*=.*$") ""))))))
|
| 789 | (build-system gnu-build-system)
|
| 790 | (arguments
|
| 791 | `(#:test-target "test"
|
| 792 | |
| 793 | #:tests? ,(and (target-x86?)
|
| 794 | (not (%current-target-system)))
|
| 795 | #:phases (modify-phases %standard-phases
|
| 796 | (add-after 'unpack 'patch
|
| 797 | (lambda* (#:key outputs #:allow-other-keys)
|
| 798 | (let* ((out (assoc-ref outputs "out"))
|
| 799 | (include (string-append out "/include"))
|
| 800 | (lib (string-append out "/lib")))
|
| 801 | |
| 802 | (substitute* "Makefile"
|
| 803 | (("VERSION.*=.*$")
|
| 804 | (string-append "VERSION := "
|
| 805 | ,version "\n"))
|
| 806 | (("PREFIX.*=.*$")
|
| 807 | (string-append "PREFIX := " out "\n"))
|
| 808 | (("MAJOR_VERSION.*=.*$")
|
| 809 | (string-append "MAJOR_VERSION := "
|
| 810 | ,(version-major version) "\n"))
|
| 811 | (("LIBDIR.*=.*$")
|
| 812 | (string-append "LIBDIR = " lib "\n"))
|
| 813 | (("/usr/include")
|
| 814 | include)))))
|
| 815 | |
| 816 | |
| 817 | |
| 818 | (add-before 'check 'make-x86test
|
| 819 | (lambda _
|
| 820 | (invoke "make" "-C" "test" "x86test")))
|
| 821 | (delete 'configure)))) |
| 822 | (native-inputs (list nasm perl))
|
| 823 | (synopsis "Library for x86 emulation")
|
| 824 | (description
|
| 825 | "Libx86emu is a small library to emulate x86 instructions. The
|
| 826 | focus here is not a complete emulation but to cover enough for typical
|
| 827 | firmware blobs. You can
|
| 828 | @enumerate
|
| 829 | @item intercept any memory access or directly map real memory ranges
|
| 830 | @item intercept any i/o access, map real i/o ports, or block any real i/o
|
| 831 | @item intercept any interrupt
|
| 832 | @item add a hook to run after each instruction
|
| 833 | @item recognize a special x86 instruction that can trigger logging
|
| 834 | @item use integrated logging
|
| 835 | @end enumerate")
|
| 836 | (license (license:x11-style "file://LICENSE"))))
|
| 837 |
|
| 838 | (define-public ganeti
|
| 839 | (package
|
| 840 | (name "ganeti")
|
| 841 | (version "3.1.1")
|
| 842 | (source (origin
|
| 843 | (method git-fetch)
|
| 844 | (uri (git-reference
|
| 845 | (url "https://github.com/ganeti/ganeti")
|
| 846 | (commit (string-append "v" version))))
|
| 847 | (sha256
|
| 848 | (base32 "1l3a3rw7bd7545irz1n0w3bj3djkrl7x90aw6hg39d3mhwpg9vhc"))
|
| 849 | (file-name (git-file-name name version))
|
| 850 | (patches (search-patches "ganeti-shepherd-support.patch"
|
| 851 | "ganeti-shepherd-master-failover.patch"
|
| 852 | "ganeti-haskell-pythondir.patch"
|
| 853 | "ganeti-disable-version-symlinks.patch"
|
| 854 | "ganeti-lens-compat.patch"))))
|
| 855 | (build-system gnu-build-system)
|
| 856 | (arguments
|
| 857 | (list
|
| 858 | #:imported-modules `(,@%pyproject-build-system-modules
|
| 859 | ,@%haskell-build-system-modules)
|
| 860 | #:modules `(,@%default-gnu-modules
|
| 861 | ((guix build haskell-build-system) #:prefix haskell:)
|
| 862 | ((guix build pyproject-build-system) #:select (site-packages))
|
| 863 | (srfi srfi-1)
|
| 864 | (srfi srfi-26)
|
| 865 | (ice-9 match)
|
| 866 | (ice-9 rdelim))
|
| 867 |
|
| 868 | |
| 869 | |
| 870 | |
| 871 | |
| 872 | #:test-target "check-TESTS"
|
| 873 |
|
| 874 | #:configure-flags
|
| 875 | #~(list "--localstatedir=/var"
|
| 876 | "--sharedstatedir=/var"
|
| 877 | "--sysconfdir=/etc"
|
| 878 | "--enable-haskell-tests"
|
| 879 |
|
| 880 | |
| 881 | |
| 882 | |
| 883 | |
| 884 | |
| 885 | |
| 886 | "--disable-version-links"
|
| 887 |
|
| 888 | |
| 889 | |
| 890 | |
| 891 | |
| 892 | "--with-sshd-restart-command='herd restart ssh-daemon'"
|
| 893 |
|
| 894 | |
| 895 | |
| 896 | "--with-os-search-path=/run/current-system/profile/share/ganeti/os"
|
| 897 |
|
| 898 | |
| 899 | |
| 900 | (string-append
|
| 901 | "--with-kvm-path=/run/current-system/profile/bin/"
|
| 902 | #$(system->qemu-target (%current-system))))
|
| 903 | #:phases
|
| 904 | #~(modify-phases %standard-phases
|
| 905 | (add-after 'unpack 'create-vcs-version
|
| 906 | (lambda _
|
| 907 | |
| 908 | |
| 909 | |
| 910 | (unless (file-exists? "vcs-version")
|
| 911 | (call-with-output-file "vcs-version"
|
| 912 | (cut format <> "v~a~%" #$version)))))
|
| 913 | (add-after 'unpack 'patch-absolute-file-names
|
| 914 | (lambda* (#:key inputs #:allow-other-keys)
|
| 915 | (substitute* '("lib/utils/process.py"
|
| 916 | "lib/utils/text.py"
|
| 917 | "src/Ganeti/Constants.hs"
|
| 918 | "src/Ganeti/HTools/CLI.hs"
|
| 919 | "test/py/legacy/ganeti.config_unittest.py"
|
| 920 | "test/py/legacy/ganeti.hooks_unittest.py"
|
| 921 | "test/py/legacy/ganeti.utils.process_unittest.py"
|
| 922 | "test/py/legacy/ganeti.utils.text_unittest.py"
|
| 923 | "test/py/legacy/ganeti.utils.wrapper_unittest.py")
|
| 924 | (("/bin/sh") (search-input-file inputs "/bin/sh"))
|
| 925 | (("/bin/bash") (search-input-file inputs "/bin/bash"))
|
| 926 | (("/usr/bin/env") (search-input-file inputs "/bin/env"))
|
| 927 | (("/bin/true") (search-input-file inputs "/bin/true")))
|
| 928 |
|
| 929 | |
| 930 | |
| 931 | |
| 932 | |
| 933 | (substitute* "tools/master-ip-setup"
|
| 934 | (("arping") (search-input-file inputs "/bin/arping"))
|
| 935 | (("ndisc6") (search-input-file inputs "/bin/ndisc6"))
|
| 936 | (("fping") (search-input-file inputs "/sbin/fping"))
|
| 937 | (("grep") (search-input-file inputs "/bin/grep"))
|
| 938 | (("ip addr") (string-append (search-input-file inputs "/sbin/ip")
|
| 939 | " addr")))))
|
| 940 | (add-after 'unpack 'override-builtin-PATH
|
| 941 | (lambda _
|
| 942 | |
| 943 | |
| 944 | (substitute* "src/Ganeti/Constants.hs"
|
| 945 | (("/sbin:/bin:/usr/sbin:/usr/bin")
|
| 946 | "/run/privileged/bin:/run/current-system/profile/sbin:\
|
| 947 | /run/current-system/profile/bin"))))
|
| 948 | (add-after 'bootstrap 'patch-sphinx-version-detection
|
| 949 | (lambda _
|
| 950 | |
| 951 | |
| 952 | |
| 953 | (substitute* "configure"
|
| 954 | (("\\$SPHINX --version 2>&1")
|
| 955 | "$SPHINX --version 2>&1 \
|
| 956 | | sed 's/.sphinx-build-real/sphinx-build/g'"))))
|
| 957 | |
| 958 | |
| 959 | |
| 960 | (add-before 'configure 'configure-haskell
|
| 961 | (lambda* (#:key system inputs outputs #:allow-other-keys)
|
| 962 | ((assoc-ref haskell:%standard-phases 'setup-compiler)
|
| 963 | #:system system
|
| 964 | |
| 965 | |
| 966 | |
| 967 | #:inputs `(("haskell" . ,(assoc-ref inputs "ghc")) ,@inputs)
|
| 968 | #:outputs outputs)))
|
| 969 | (add-after 'configure 'do-not-use-GHC_PACKAGE_PATH
|
| 970 | (lambda _
|
| 971 | |
| 972 | |
| 973 | (let ((package-db (string-append (or (getenv "TMP") "/tmp")
|
| 974 | "/package.conf.d")))
|
| 975 | (unsetenv "GHC_PACKAGE_PATH")
|
| 976 | (substitute* "Makefile"
|
| 977 | |
| 978 | (("^CABAL_SETUP = runhaskell")
|
| 979 | (string-append "CABAL_SETUP = runhaskell -package-db="
|
| 980 | package-db))
|
| 981 | (("\\$\\(CABAL_SETUP\\) configure")
|
| 982 | (string-append "$(CABAL_SETUP) configure --package-db="
|
| 983 | package-db))
|
| 984 | (("\\$\\(GHC\\)")
|
| 985 | (string-append "$(GHC) -package-db=" package-db))))))
|
| 986 | (add-after 'configure 'make-ghc-use-shared-libraries
|
| 987 | (lambda _
|
| 988 | (substitute* "Makefile"
|
| 989 | (("HFLAGS =") "HFLAGS = -dynamic -fPIC"))))
|
| 990 | (add-after 'configure 'fix-installation-directories
|
| 991 | (lambda _
|
| 992 | (substitute* "Makefile"
|
| 993 | |
| 994 | (("\\$\\(DESTDIR\\)\\$\\{localstatedir\\}")
|
| 995 | "$(DESTDIR)${prefix}${localstatedir}")
|
| 996 | |
| 997 | |
| 998 | (("\\$\\(DESTDIR\\)\\$\\(ifupdir\\)")
|
| 999 | "$(DESTDIR)${prefix}$(ifupdir)"))))
|
| 1000 | (add-before 'build 'adjust-tests
|
| 1001 | (lambda _
|
| 1002 | |
| 1003 | |
| 1004 | (substitute* "Makefile"
|
| 1005 | |
| 1006 | |
| 1007 | (("test/py/legacy/ganeti\\.asyncnotifier_unittest\\.py") "")
|
| 1008 | (("test/py/legacy/ganeti\\.backend_unittest\\.py") "")
|
| 1009 | (("test/py/legacy/ganeti\\.backend_unittest-runasroot\\.py") "")
|
| 1010 | (("test/py/legacy/ganeti\\.daemon_unittest\\.py") "")
|
| 1011 | (("test/py/legacy/ganeti\\.hypervisor\\.hv_kvm_unittest\\.py") "")
|
| 1012 | (("test/py/legacy/ganeti\\.tools\\.ensure_dirs_unittest\\.py") "")
|
| 1013 | (("test/py/legacy/ganeti\\.utils\\.io_unittest-runasroot\\.py") "")
|
| 1014 | |
| 1015 | |
| 1016 | (("test/py/legacy/bash_completion\\.bash")
|
| 1017 | "")
|
| 1018 | |
| 1019 | |
| 1020 | |
| 1021 | (("test/hs/offline-test\\.sh")
|
| 1022 | ""))))
|
| 1023 | (add-after 'build 'build-bash-completions
|
| 1024 | (lambda _
|
| 1025 | (setenv "PYTHONPATH" ".")
|
| 1026 | (invoke "./autotools/build-bash-completion")
|
| 1027 | (unsetenv "PYTHONPATH")))
|
| 1028 | (add-before 'check 'pre-check
|
| 1029 | (lambda* (#:key inputs #:allow-other-keys)
|
| 1030 | |
| 1031 | (setenv "TZDIR" (search-input-directory inputs "share/zoneinfo"))
|
| 1032 |
|
| 1033 | (substitute* "test/py/legacy/ganeti.utils.process_unittest.py"
|
| 1034 | |
| 1035 | |
| 1036 | |
| 1037 | ((".*def testResetEnv.*" all)
|
| 1038 | (string-append " @unittest.skipIf(True, "
|
| 1039 | "\"cannot reset env in the build container\")\n"
|
| 1040 | all))
|
| 1041 |
|
| 1042 | |
| 1043 | |
| 1044 | ((".*def testPidFile.*" all)
|
| 1045 | (string-append " @unittest.skipIf(True, "
|
| 1046 | "\"testPidFile fails in the build container\")\n"
|
| 1047 | all)))
|
| 1048 |
|
| 1049 | (substitute* "test/py/legacy/ganeti.hooks_unittest.py"
|
| 1050 | |
| 1051 | |
| 1052 | ((" \"\"\"Test environment execution\"\"\"" all)
|
| 1053 | (string-append all "\n raise unittest.SkipTest"
|
| 1054 | "(\"cannot reset env in the build container\")")))
|
| 1055 |
|
| 1056 | |
| 1057 | (with-directory-excursion "test/hs"
|
| 1058 | (for-each (cut symlink "../../src/htools" <>)
|
| 1059 | '("hspace" "hscan" "hinfo" "hbal" "hroller"
|
| 1060 | "hcheck" "hail" "hsqueeze")))))
|
| 1061 | (add-after 'install 'install-bash-completions
|
| 1062 | (lambda _
|
| 1063 | (let ((compdir (string-append #$output "/etc/bash_completion.d")))
|
| 1064 | (mkdir-p compdir)
|
| 1065 | (copy-file "doc/examples/bash_completion"
|
| 1066 | (string-append compdir "/ganeti"))
|
| 1067 | |
| 1068 | |
| 1069 | (with-directory-excursion compdir
|
| 1070 | (for-each
|
| 1071 | (lambda (prog) (symlink "ganeti" prog))
|
| 1072 | (call-with-input-file "ganeti"
|
| 1073 | (lambda (port)
|
| 1074 | (let loop ((line (read-line port))
|
| 1075 | (progs '()))
|
| 1076 | (if (eof-object? line)
|
| 1077 | progs
|
| 1078 | (if (string-prefix? "complete" line)
|
| 1079 | (loop (read-line port)
|
| 1080 | |
| 1081 | |
| 1082 | |
| 1083 | |
| 1084 | |
| 1085 | (match (string-split line #\ )
|
| 1086 | ((commands ... prog)
|
| 1087 | (cons (basename prog) progs))))
|
| 1088 | (loop (read-line port) progs)))))))))))
|
| 1089 | (add-after 'install 'wrap
|
| 1090 | (lambda* (#:key inputs outputs #:allow-other-keys)
|
| 1091 | (let* ((out (assoc-ref outputs "out"))
|
| 1092 | (sbin (string-append out "/sbin"))
|
| 1093 | (lib (string-append out "/lib"))
|
| 1094 | (PYTHONPATH (string-append (site-packages inputs outputs)
|
| 1095 | ":" (getenv "GUIX_PYTHONPATH"))))
|
| 1096 | (define (shell-script? file)
|
| 1097 | (call-with-ascii-input-file file
|
| 1098 | (lambda (port)
|
| 1099 | (let ((shebang (false-if-exception (read-line port))))
|
| 1100 | (and shebang
|
| 1101 | (string-prefix? "#!" shebang)
|
| 1102 | (or (string-contains shebang "/bin/bash")
|
| 1103 | (string-contains shebang "/bin/sh")))))))
|
| 1104 |
|
| 1105 | (define* (wrap? file #:rest _)
|
| 1106 | |
| 1107 | |
| 1108 | |
| 1109 | |
| 1110 | (and (executable-file? file)
|
| 1111 | (not (symbolic-link? file))
|
| 1112 | (not (shell-script? file))))
|
| 1113 |
|
| 1114 | (for-each (cut wrap-program <>
|
| 1115 | `("GUIX_PYTHONPATH" ":" prefix
|
| 1116 | (,PYTHONPATH)))
|
| 1117 | (append-map (cut find-files <> wrap?)
|
| 1118 | (list (string-append lib "/ganeti")
|
| 1119 | sbin)))))))))
|
| 1120 | (native-inputs
|
| 1121 | (list ghc
|
| 1122 | cabal-install
|
| 1123 | m4
|
| 1124 | autoconf
|
| 1125 | automake
|
| 1126 |
|
| 1127 | |
| 1128 | python-docutils
|
| 1129 | python-sphinx
|
| 1130 | pandoc
|
| 1131 | graphviz
|
| 1132 |
|
| 1133 | |
| 1134 | fakeroot
|
| 1135 | ghc-temporary
|
| 1136 | ghc-test-framework
|
| 1137 | ghc-test-framework-hunit
|
| 1138 | ghc-test-framework-quickcheck2
|
| 1139 | python-pytest
|
| 1140 | python-pyyaml
|
| 1141 | openssh
|
| 1142 | procps
|
| 1143 | shelltestrunner
|
| 1144 | tzdata-for-tests))
|
| 1145 | (inputs
|
| 1146 | (list bash-minimal
|
| 1147 | iputils |
| 1148 | curl
|
| 1149 | fping
|
| 1150 | iproute
|
| 1151 | ndisc6
|
| 1152 | socat
|
| 1153 | qemu-minimal |
| 1154 | ghc-attoparsec
|
| 1155 | ghc-base64-bytestring
|
| 1156 | ghc-case-insensitive
|
| 1157 | ghc-cryptonite
|
| 1158 | ghc-curl
|
| 1159 | ghc-hinotify
|
| 1160 | ghc-hslogger
|
| 1161 | ghc-json
|
| 1162 | ghc-lens
|
| 1163 | ghc-lifted-base
|
| 1164 | ghc-monad-control
|
| 1165 | ghc-network
|
| 1166 | ghc-old-time
|
| 1167 | ghc-parallel
|
| 1168 | ghc-psqueue
|
| 1169 | ghc-regex-pcre
|
| 1170 | ghc-random
|
| 1171 | ghc-transformers-base
|
| 1172 | ghc-utf8-string
|
| 1173 | ghc-zlib
|
| 1174 | |
| 1175 | ghc-snap-core
|
| 1176 | ghc-snap-server
|
| 1177 | python
|
| 1178 | python-pyopenssl
|
| 1179 | python-simplejson
|
| 1180 | python-pyparsing
|
| 1181 | python-pyinotify
|
| 1182 | python-pycurl
|
| 1183 | python-bitarray-2
|
| 1184 | python-paramiko
|
| 1185 | python-psutil))
|
| 1186 | (home-page "https://www.ganeti.org/")
|
| 1187 | (synopsis "Cluster-based virtual machine management system")
|
| 1188 | (description
|
| 1189 | "Ganeti is a virtual machine management tool built on top of existing
|
| 1190 | virtualization technologies such as Xen or KVM. Ganeti controls:
|
| 1191 |
|
| 1192 | @itemize @bullet
|
| 1193 | @item Disk creation management;
|
| 1194 | @item Operating system installation for instances (in co-operation with
|
| 1195 | OS-specific install scripts); and
|
| 1196 | @item Startup, shutdown, and failover between physical systems.
|
| 1197 | @end itemize
|
| 1198 |
|
| 1199 | Ganeti is designed to facilitate cluster management of virtual servers and
|
| 1200 | to provide fast and simple recovery after physical failures, using
|
| 1201 | commodity hardware.")
|
| 1202 | (license license:bsd-2)))
|
| 1203 |
|
| 1204 | (define-public ganeti-instance-guix
|
| 1205 | (package
|
| 1206 | (name "ganeti-instance-guix")
|
| 1207 | (version "0.8")
|
| 1208 | (home-page "https://github.com/mbakke/ganeti-instance-guix")
|
| 1209 | (source (origin
|
| 1210 | (method git-fetch)
|
| 1211 | (uri (git-reference (url home-page) (commit version)))
|
| 1212 | (file-name (git-file-name name version))
|
| 1213 | (sha256
|
| 1214 | (base32
|
| 1215 | "0sw9ks3j3y33apdcghjxxjf09ld592z9skaa7bgn9d2lhplzjihr"))))
|
| 1216 | (build-system gnu-build-system)
|
| 1217 | (arguments
|
| 1218 | '(#:configure-flags '("--sysconfdir=/etc" "--localstatedir=/var")))
|
| 1219 | (native-inputs
|
| 1220 | (list autoconf automake jq))
|
| 1221 | (inputs
|
| 1222 | (list btrfs-progs
|
| 1223 | cryptsetup-minimal
|
| 1224 | e2fsprogs
|
| 1225 | f2fs-tools
|
| 1226 | lvm2
|
| 1227 | multipath-tools
|
| 1228 | util-linux
|
| 1229 | parted
|
| 1230 | xfsprogs))
|
| 1231 | (synopsis "Guix OS integration for Ganeti")
|
| 1232 | (description
|
| 1233 | "This package provides a guest OS definition for Ganeti that uses
|
| 1234 | Guix to build virtual machines.")
|
| 1235 | (license license:gpl3+)))
|
| 1236 |
|
| 1237 | (define-public ganeti-instance-debootstrap
|
| 1238 | (package
|
| 1239 | (name "ganeti-instance-debootstrap")
|
| 1240 | |
| 1241 | |
| 1242 | (version "0.16-2-ge145396")
|
| 1243 | (home-page "https://github.com/ganeti/instance-debootstrap")
|
| 1244 | (source (origin
|
| 1245 | (method git-fetch)
|
| 1246 | (uri (git-reference (url home-page) (commit version)))
|
| 1247 | (file-name (git-file-name name version))
|
| 1248 | (sha256
|
| 1249 | (base32
|
| 1250 | "0f2isw9d8lawzj21rrq1q9xhq8xfa65rqbhqmrn59z201x9q1336"))))
|
| 1251 | (build-system gnu-build-system)
|
| 1252 | (arguments
|
| 1253 | '(#:configure-flags '("--sysconfdir=/etc" "--localstatedir=/var")
|
| 1254 | #:phases (modify-phases %standard-phases
|
| 1255 | (add-after 'unpack 'add-absolute-references
|
| 1256 | (lambda _
|
| 1257 | (substitute* "common.sh.in"
|
| 1258 | (("/sbin/blkid") (which "blkid"))
|
| 1259 | (("kpartx -")
|
| 1260 | (string-append (which "kpartx") " -")))
|
| 1261 | (substitute* "import"
|
| 1262 | (("restore -r")
|
| 1263 | (string-append (which "restore") " -r")))
|
| 1264 | (substitute* "export"
|
| 1265 | (("dump -0")
|
| 1266 | (string-append (which "dump") " -0")))
|
| 1267 | (substitute* "create"
|
| 1268 | (("debootstrap") (which "debootstrap"))
|
| 1269 | (("`which run-parts`") (which "run-parts"))
|
| 1270 | |
| 1271 | |
| 1272 | |
| 1273 | (("passwd") "/bin/passwd"))
|
| 1274 | #t))
|
| 1275 | (add-after 'unpack 'set-dpkg-arch
|
| 1276 | (lambda* (#:key system #:allow-other-keys)
|
| 1277 | |
| 1278 | |
| 1279 | |
| 1280 | |
| 1281 | (let ((dpkg-arch
|
| 1282 | (cond ((string-prefix? "x86_64" system)
|
| 1283 | "amd64")
|
| 1284 | ((string-prefix? "i686" system)
|
| 1285 | "i386")
|
| 1286 | ((string-prefix? "aarch64" system)
|
| 1287 | "arm64")
|
| 1288 | (else (car (string-split system #\-))))))
|
| 1289 | (substitute* "create"
|
| 1290 | (("`dpkg --print-architecture`")
|
| 1291 | dpkg-arch))
|
| 1292 | #t)))
|
| 1293 | (add-after 'configure 'adjust-Makefile
|
| 1294 | (lambda _
|
| 1295 | |
| 1296 | |
| 1297 | |
| 1298 | (substitute* "Makefile"
|
| 1299 | (("\\$\\(variantsdir\\)")
|
| 1300 | "$(prefix)/etc/ganeti/instance-debootstrap/variants")
|
| 1301 | (("\\$\\(defaultsdir\\)")
|
| 1302 | "$(prefix)/etc/default/ganeti-instance-debootstrap"))
|
| 1303 | #t))
|
| 1304 | (add-after 'install 'make-variants.list-symlink
|
| 1305 | (lambda* (#:key outputs #:allow-other-keys)
|
| 1306 | |
| 1307 | |
| 1308 | |
| 1309 | |
| 1310 | (with-directory-excursion (string-append
|
| 1311 | (assoc-ref outputs "out")
|
| 1312 | "/share/ganeti/os/debootstrap")
|
| 1313 | (delete-file "variants.list")
|
| 1314 | (symlink "/etc/ganeti/instance-debootstrap/variants/variants.list"
|
| 1315 | "variants.list"))
|
| 1316 | #t)))))
|
| 1317 | (native-inputs
|
| 1318 | (list autoconf automake))
|
| 1319 | (inputs
|
| 1320 | `(("debianutils" ,debianutils)
|
| 1321 | ("debootstrap" ,debootstrap)
|
| 1322 | ("dump" ,dump)
|
| 1323 | ("kpartx" ,multipath-tools)
|
| 1324 | ("util-linux" ,util-linux)))
|
| 1325 | (synopsis "Debian OS integration for Ganeti")
|
| 1326 | (description
|
| 1327 | "This package provides a guest OS definition for Ganeti. It installs
|
| 1328 | Debian or a derivative using @command{debootstrap}.")
|
| 1329 | (license license:gpl2+)))
|
| 1330 |
|
| 1331 | (define-public rvvm
|
| 1332 | (package
|
| 1333 | (name "rvvm")
|
| 1334 | (version "0.6")
|
| 1335 | (source (origin
|
| 1336 | (method git-fetch)
|
| 1337 | (uri (git-reference
|
| 1338 | (url "https://github.com/LekKit/RVVM")
|
| 1339 | (commit (string-append "v" version))))
|
| 1340 | (file-name (git-file-name name version))
|
| 1341 | (sha256
|
| 1342 | (base32
|
| 1343 | "1mbb1c9r33am2z27a17xkjw5gpzvz41wywx1g021s0w34lmsax76"))))
|
| 1344 | (build-system cmake-build-system)
|
| 1345 | (arguments
|
| 1346 | (list
|
| 1347 | #:configure-flags
|
| 1348 | |
| 1349 | #~(#$@(if (or (target-x86?)
|
| 1350 | (target-arm?))
|
| 1351 | #~'()
|
| 1352 | #~(list "-DRVVM_USE_JIT=NO")))
|
| 1353 | #:modules `((srfi srfi-26)
|
| 1354 | (guix build utils)
|
| 1355 | (guix build cmake-build-system))
|
| 1356 | #:phases
|
| 1357 | #~(modify-phases %standard-phases
|
| 1358 | |
| 1359 | (replace 'install
|
| 1360 | (lambda _
|
| 1361 | (let ((src "../source/src/")
|
| 1362 | (incl (string-append #$output "/include/rvvm/")))
|
| 1363 | (install-file "rvvm" (string-append #$output "/bin"))
|
| 1364 | (for-each
|
| 1365 | (cut install-file <> (string-append #$output "/lib"))
|
| 1366 | (find-files "." "\\.(so|a)$"))
|
| 1367 | (install-file (string-append src "rvvmlib.h") incl)
|
| 1368 | (for-each
|
| 1369 | (cut install-file <> (string-append incl "devices"))
|
| 1370 | (find-files (string-append src "devices") "\\.h$"))))))
|
| 1371 | #:tests? #f)) |
| 1372 | (home-page "https://github.com/LekKit/RVVM")
|
| 1373 | (synopsis "RISC-V virtual machine")
|
| 1374 | (description
|
| 1375 | "RVVM is a RISC-V CPU and system software implementation written in C. It
|
| 1376 | supports the entire RV64GC ISA, and it passes compliance tests for both RV64 and
|
| 1377 | RV32. OpenSBI, U-Boot, and custom firmwares boot and execute properly. It is
|
| 1378 | capable of running Linux, FreeBSD, OpenBSD, Haiku, and other OSes. Furthermore,
|
| 1379 | it emulates a variety of hardware and peripherals.")
|
| 1380 | (license (list license:gpl3+ license:mpl2.0))))
|
| 1381 |
|
| 1382 | (define-public spike
|
| 1383 | |
| 1384 | (let ((commit "262df8bfac33b0419688429dd066487744db5c79")
|
| 1385 | (revision "1"))
|
| 1386 | (package
|
| 1387 | (name "spike")
|
| 1388 | (version (git-version "1.1.0" revision commit))
|
| 1389 | (source
|
| 1390 | (origin
|
| 1391 | (method git-fetch)
|
| 1392 | (uri (git-reference
|
| 1393 | (url "https://github.com/riscv-software-src/riscv-isa-sim")
|
| 1394 | (commit commit)))
|
| 1395 | (file-name (git-file-name name version))
|
| 1396 | (sha256
|
| 1397 | (base32 "1dyvkidksp0mj6vp8bn1gyzdcpay4m8x653axaivk38q4jyz2qkh"))))
|
| 1398 | (build-system gnu-build-system)
|
| 1399 | (arguments
|
| 1400 | (list
|
| 1401 | #:phases
|
| 1402 | #~(modify-phases %standard-phases
|
| 1403 | (add-before 'configure 'configure-dtc-path
|
| 1404 | (lambda* (#:key inputs #:allow-other-keys)
|
| 1405 | |
| 1406 | (substitute* "riscv/dts.cc"
|
| 1407 | (("DTC")
|
| 1408 | (string-append "\"" (search-input-file inputs "/bin/dtc")
|
| 1409 | "\""))))))))
|
| 1410 | (inputs
|
| 1411 | (list dtc))
|
| 1412 | (native-inputs
|
| 1413 | (list python-minimal-wrapper))
|
| 1414 | (home-page "https://github.com/riscv-software-src/riscv-isa-sim")
|
| 1415 | (synopsis "RISC-V ISA Simulator")
|
| 1416 | (description "Spike, the RISC-V ISA Simulator, implements a functional model
|
| 1417 | of one or more RISC-V harts.")
|
| 1418 | (license license:bsd-3))))
|
| 1419 |
|
| 1420 | (define-public swtpm
|
| 1421 | (package
|
| 1422 | (name "swtpm")
|
| 1423 | |
| 1424 | |
| 1425 | (version "0.10.1")
|
| 1426 | (source
|
| 1427 | (origin
|
| 1428 | (method git-fetch)
|
| 1429 | (uri (git-reference
|
| 1430 | (url "https://github.com/stefanberger/swtpm")
|
| 1431 | (commit (string-append "v" version))))
|
| 1432 | (file-name (git-file-name name version))
|
| 1433 | (sha256
|
| 1434 | (base32 "0wah3zsnkasccazzlycq8scc52q4h1g58w0br45sr185inw6zgrp"))
|
| 1435 | (snippet
|
| 1436 | #~(begin
|
| 1437 | |
| 1438 | (use-modules (guix build utils))
|
| 1439 | (substitute* "samples/Makefile.am"
|
| 1440 | (("install-data-local")
|
| 1441 | "install-data-local-DISABLED"))))))
|
| 1442 | (build-system gnu-build-system)
|
| 1443 | (arguments
|
| 1444 | (list
|
| 1445 | |
| 1446 | #:make-flags
|
| 1447 | #~(let ((tests '("test_ctrlchannel4"
|
| 1448 | "test_parameters"
|
| 1449 | "test_print_capabilities"
|
| 1450 | "test_swtpm_cert"
|
| 1451 | "test_swtpm_setup_create_cert"
|
| 1452 | "test_swtpm_setup_file_backend"
|
| 1453 | "test_swtpm_setup_misc"
|
| 1454 | "test_swtpm_setup_overwrite"
|
| 1455 | "test_tpm2_parameters"
|
| 1456 | "test_tpm2_print_capabilities"
|
| 1457 | "test_tpm2_swtpm_cert"
|
| 1458 | "test_tpm2_swtpm_cert_ecc"
|
| 1459 | "test_tpm2_swtpm_localca"
|
| 1460 | "test_tpm2_swtpm_setup_create_cert"
|
| 1461 | "test_tpm2_swtpm_setup_overwrite")))
|
| 1462 | (list (string-append "TESTS=" (string-join tests " "))))
|
| 1463 | #:configure-flags
|
| 1464 | #~'("--localstatedir=/var")
|
| 1465 | #:phases
|
| 1466 | #~(modify-phases %standard-phases
|
| 1467 | (add-after 'unpack 'fix-program-references
|
| 1468 | (lambda* (#:key inputs #:allow-other-keys)
|
| 1469 | (substitute* "tests/common"
|
| 1470 | (("CERTTOOL=certtool")
|
| 1471 | (string-append "CERTTOOL="
|
| 1472 | (search-input-file inputs "bin/certtool"))))
|
| 1473 | (substitute* "src/swtpm_localca/swtpm_localca.c"
|
| 1474 | (("CERTTOOL_NAME \"certtool\"")
|
| 1475 | (string-append "CERTTOOL_NAME \""
|
| 1476 | (search-input-file inputs "bin/certtool") "\""))
|
| 1477 | (("g_find_program_in_path\\(\"swtpm_cert\"}\\)")
|
| 1478 | (string-append "strdup(\""
|
| 1479 | #$output "/bin/swtpm_cert"
|
| 1480 | "\")")))
|
| 1481 | (substitute* "src/swtpm_setup/swtpm_setup.c"
|
| 1482 | (("g_find_program_in_path\\(\"swtpm\"\\)")
|
| 1483 | (string-append "strdup(\""
|
| 1484 | #$output "/bin/swtpm"
|
| 1485 | "\")")))))
|
| 1486 | |
| 1487 | |
| 1488 | (delete 'check)
|
| 1489 | (add-after 'install 'check
|
| 1490 | (assoc-ref %standard-phases 'check)))))
|
| 1491 | (inputs (list |
| 1492 | |
| 1493 | gnutls
|
| 1494 | gmp
|
| 1495 | openssl
|
| 1496 | json-glib
|
| 1497 | libseccomp
|
| 1498 | libselinux
|
| 1499 | libtasn1
|
| 1500 | libtool
|
| 1501 | libtpms))
|
| 1502 | (native-inputs (list autoconf
|
| 1503 | automake
|
| 1504 | bash-minimal
|
| 1505 | expect
|
| 1506 | iproute
|
| 1507 | net-tools
|
| 1508 | socat
|
| 1509 | perl
|
| 1510 | pkg-config
|
| 1511 | python))
|
| 1512 | (home-page "https://github.com/stefanberger/swtpm")
|
| 1513 | (synopsis "TPM emulator")
|
| 1514 | (description
|
| 1515 | "swtpm provides a TPM emulator with socket, character device,
|
| 1516 | and CUSE interface. It can be combined with qemu & libvirt to expose TPM
|
| 1517 | functionality to virtual machines.")
|
| 1518 | (license license:bsd-3)))
|
| 1519 |
|
| 1520 | (define-public incus
|
| 1521 | (package
|
| 1522 | (name "incus")
|
| 1523 | (version "6.15.0")
|
| 1524 | (source
|
| 1525 | (origin
|
| 1526 | (method git-fetch)
|
| 1527 | (uri (git-reference
|
| 1528 | (url "https://github.com/lxc/incus")
|
| 1529 | (commit (string-append "v" version))))
|
| 1530 | (file-name (git-file-name name version))
|
| 1531 | (sha256
|
| 1532 | (base32 "1j6lfx4jw6ngb2d3d48qz8q51w8x1j5vyjyhssppwd83ydkh060y"))))
|
| 1533 | (build-system go-build-system)
|
| 1534 | (arguments
|
| 1535 | (list
|
| 1536 | #:install-source? #f
|
| 1537 | #:tests? #f |
| 1538 | #:import-path "github.com/lxc/incus/v6"
|
| 1539 | #:embed-files
|
| 1540 | #~(list "children"
|
| 1541 | "form_post.html.tmpl"
|
| 1542 | "nodes"
|
| 1543 | "text")
|
| 1544 | #:test-flags
|
| 1545 | #~(list "-tags" "libsqlite3")
|
| 1546 | #:phases
|
| 1547 | #~(modify-phases %standard-phases
|
| 1548 | (add-after 'unpack 'fix-module-path
|
| 1549 | |
| 1550 | |
| 1551 | (lambda* (#:key import-path #:allow-other-keys)
|
| 1552 | (with-directory-excursion (string-append "src/" import-path)
|
| 1553 | (substitute* (find-files "." "\\.go$")
|
| 1554 | (("github.com/ovn-org/libovsdb")
|
| 1555 | "github.com/ovn-kubernetes/libovsdb")))))
|
| 1556 | (replace 'build
|
| 1557 | (lambda* (#:key import-path #:allow-other-keys)
|
| 1558 | (with-directory-excursion (string-append "src/" import-path)
|
| 1559 | (invoke "make" "build"
|
| 1560 | (string-append "CC=" #$(cc-for-target))
|
| 1561 | "TAG_SQLITE3=libsqlite3")))))))
|
| 1562 | |
| 1563 | |
| 1564 | |
| 1565 | |
| 1566 | (native-inputs
|
| 1567 | (list go-github-com-adhocore-gronx
|
| 1568 | go-github-com-apex-log
|
| 1569 | go-github-com-armon-go-proxyproto
|
| 1570 | go-github-com-cenkalti-backoff-v4
|
| 1571 | go-github-com-checkpoint-restore-go-criu-v6
|
| 1572 | go-github-com-cowsql-go-cowsql
|
| 1573 | go-github-com-digitalocean-go-smbios
|
| 1574 | go-github-com-dustinkirkland-golang-petname
|
| 1575 | go-github-com-flosch-pongo2-v6
|
| 1576 | go-github-com-fvbommel-sortorder
|
| 1577 | go-github-com-go-chi-chi-v5
|
| 1578 | go-github-com-go-jose-go-jose-v4
|
| 1579 | go-github-com-go-logr-logr
|
| 1580 | go-github-com-golang-jwt-jwt-v5
|
| 1581 | go-github-com-google-gopacket
|
| 1582 | go-github-com-google-uuid
|
| 1583 | go-github-com-gorilla-mux
|
| 1584 | go-github-com-gorilla-websocket
|
| 1585 | go-github-com-gosexy-gettext
|
| 1586 | go-github-com-insomniacslk-dhcp
|
| 1587 | go-github-com-jaypipes-pcidb
|
| 1588 | go-github-com-jochenvg-go-udev
|
| 1589 | go-github-com-kballard-go-shellquote
|
| 1590 | go-github-com-linbit-golinstor
|
| 1591 | go-github-com-lxc-go-lxc
|
| 1592 | go-github-com-mattn-go-colorable
|
| 1593 | go-github-com-mattn-go-sqlite3
|
| 1594 | go-github-com-mdlayher-arp
|
| 1595 | go-github-com-mdlayher-ndp
|
| 1596 | go-github-com-mdlayher-netx
|
| 1597 | go-github-com-mdlayher-vsock
|
| 1598 | go-github-com-miekg-dns
|
| 1599 | go-github-com-minio-minio-go-v7
|
| 1600 | go-github-com-mitchellh-mapstructure
|
| 1601 | go-github-com-olekukonko-tablewriter
|
| 1602 | go-github-com-opencontainers-runtime-spec
|
| 1603 | go-github-com-opencontainers-umoci
|
| 1604 | go-github-com-openfga-go-sdk
|
| 1605 | go-github-com-osrg-gobgp-v3
|
| 1606 | go-github-com-ovn-kubernetes-libovsdb
|
| 1607 | go-github-com-pierrec-lz4-v4
|
| 1608 | go-github-com-pkg-sftp
|
| 1609 | go-github-com-pkg-xattr
|
| 1610 | go-github-com-sirupsen-logrus
|
| 1611 | go-github-com-spf13-cobra
|
| 1612 | go-github-com-spf13-pflag
|
| 1613 | go-github-com-stretchr-testify
|
| 1614 | go-github-com-vishvananda-netlink
|
| 1615 | go-github-com-zitadel-oidc-v3
|
| 1616 | go-go-starlark-net
|
| 1617 | go-golang-org-x-crypto
|
| 1618 | go-golang-org-x-exp
|
| 1619 | go-golang-org-x-oauth2
|
| 1620 | go-golang-org-x-sync
|
| 1621 | go-golang-org-x-sys
|
| 1622 | go-golang-org-x-term
|
| 1623 | go-golang-org-x-text
|
| 1624 | go-golang-org-x-tools
|
| 1625 | go-google-golang-org-protobuf
|
| 1626 | go-gopkg-in-yaml-v2
|
| 1627 | go-k8s-io-utils
|
| 1628 | pkg-config))
|
| 1629 | (inputs
|
| 1630 | (list acl
|
| 1631 | cowsql
|
| 1632 | dbus
|
| 1633 | eudev
|
| 1634 | libcap
|
| 1635 | libdqlite
|
| 1636 | libseccomp
|
| 1637 | libselinux
|
| 1638 | lxc))
|
| 1639 | (home-page "https://github.com/lxc/incus")
|
| 1640 | (synopsis "System container and virtual machine manager")
|
| 1641 | (description
|
| 1642 | "Incus is a modern, secure and powerful system container and virtual
|
| 1643 | machine manager.
|
| 1644 |
|
| 1645 | It provides a unified experience for running and managing full Linux systems
|
| 1646 | inside containers or virtual machines. Incus supports images for a large
|
| 1647 | number of Linux distributions (official Ubuntu images and images provided by
|
| 1648 | the community) and is built around a very powerful, yet pretty simple, REST
|
| 1649 | API. Incus scales from one instance on a single machine to a cluster in a
|
| 1650 | full data center rack, making it suitable for running workloads both for
|
| 1651 | development and in production.
|
| 1652 |
|
| 1653 | This package provides the following commands:
|
| 1654 | @itemize
|
| 1655 | @item fuidshift - tool to remap a filesystem tree, switching it from one set
|
| 1656 | of UID/GID ranges to another
|
| 1657 | @item generate-config - tool to generate documentation for Incus
|
| 1658 | @item generate-database - entry point for all @code{go:generate} directives
|
| 1659 | used in Incus' source code
|
| 1660 | @item incus - command line client for Incus
|
| 1661 | @item incus-agent - Incus virtual machine agent
|
| 1662 | @item incus-benchmark - tool to benchmark various actions on a local Incus
|
| 1663 | daemon
|
| 1664 | @item incusd - the Incus daemon
|
| 1665 | @item incus-migrate - physical to instance migration tool
|
| 1666 | @item incus-simplestreams - tool to manage the files on a static image server
|
| 1667 | using simplestreams index files as the publishing mechanism
|
| 1668 | @item incus-user - Incus user project daemon
|
| 1669 | @item lxc-to-incus - CLI client for container migration
|
| 1670 | @item lxd-to-incus - LXD to Incus migration tool
|
| 1671 | @item mini-oidc
|
| 1672 | @item sysinfo - basic system stats tool
|
| 1673 | @item tls2jwt - TLS to JWT certificate converter, reference/testing tool
|
| 1674 | @end itemize")
|
| 1675 | (license license:asl2.0)))
|
| 1676 |
|
| 1677 | (define-public libosinfo
|
| 1678 | (package
|
| 1679 | (name "libosinfo")
|
| 1680 | (version "1.12.0")
|
| 1681 | (source
|
| 1682 | (origin
|
| 1683 | (method url-fetch)
|
| 1684 | (uri (string-append "https://releases.pagure.org/libosinfo/libosinfo-"
|
| 1685 | version ".tar.xz"))
|
| 1686 | (sha256
|
| 1687 | (base32
|
| 1688 | "1dn6pzv0gzkxrjvi60cdzdmyxqlcsvinbrbds91xm4v7wbn5g1dd"))
|
| 1689 | (patches (search-patches "libosinfo-libxml2-fix.patch"))))
|
| 1690 | (build-system meson-build-system)
|
| 1691 | (arguments
|
| 1692 | (list
|
| 1693 | #:configure-flags
|
| 1694 | #~(list (string-append "-Dwith-usb-ids-path="
|
| 1695 | (search-input-file %build-inputs
|
| 1696 | "share/hwdata/usb.ids"))
|
| 1697 | (string-append "-Dwith-pci-ids-path="
|
| 1698 | (search-input-file %build-inputs
|
| 1699 | "share/hwdata/pci.ids")))
|
| 1700 | #:phases
|
| 1701 | #~(modify-phases %standard-phases
|
| 1702 | (add-after 'unpack 'patch-osinfo-path
|
| 1703 | (lambda* (#:key native-inputs inputs #:allow-other-keys)
|
| 1704 | (substitute* "osinfo/osinfo_loader.c"
|
| 1705 | (("path = DATA_DIR.*")
|
| 1706 | (format #f "path = ~s;"
|
| 1707 | (search-input-directory (or native-inputs inputs)
|
| 1708 | "share/osinfo")))))))))
|
| 1709 | (inputs (list libsoup libxml2 libxslt osinfo-db))
|
| 1710 | (native-inputs
|
| 1711 | (list `(,glib "bin") |
| 1712 | gobject-introspection
|
| 1713 | gtk-doc/stable
|
| 1714 | hwdata
|
| 1715 | vala
|
| 1716 | intltool
|
| 1717 | pkg-config))
|
| 1718 | (native-search-paths
|
| 1719 | (list (search-path-specification
|
| 1720 | (variable "OSINFO_SYSTEM_DIR")
|
| 1721 | (separator #f) |
| 1722 | (files '("share/osinfo")))))
|
| 1723 | (home-page "https://libosinfo.org/")
|
| 1724 | (synopsis "Operating system information database")
|
| 1725 | (description "libosinfo is a GObject based library API for managing
|
| 1726 | information about operating systems, hypervisors and the (virtual) hardware
|
| 1727 | devices they can support. It includes a database containing device metadata
|
| 1728 | and provides APIs to match/identify optimal devices for deploying an operating
|
| 1729 | system on a hypervisor. Via GObject Introspection, the API is available in
|
| 1730 | all common programming languages. Vala bindings are also provided.")
|
| 1731 | |
| 1732 | |
| 1733 | (license (list license:lgpl2.1+ license:gpl2+))))
|
| 1734 |
|
| 1735 | (define-public lxc
|
| 1736 | (package
|
| 1737 | (name "lxc")
|
| 1738 | (version "6.0.1")
|
| 1739 | (source (origin
|
| 1740 | (method url-fetch)
|
| 1741 | (uri (string-append
|
| 1742 | "https://linuxcontainers.org/downloads/lxc/lxc-"
|
| 1743 | version ".tar.gz"))
|
| 1744 | (sha256
|
| 1745 | (base32
|
| 1746 | "1q3p3zzm338pmc97z6ly8cjginkyljxqbk1c37l2xa46vfy8zcyc"))
|
| 1747 | (patches (search-patches "lxc-no-static-bin.patch"))))
|
| 1748 | (build-system meson-build-system)
|
| 1749 | (native-inputs
|
| 1750 | (list pkg-config docbook2x))
|
| 1751 | (inputs
|
| 1752 | (list apparmor dbus gnutls libcap libseccomp libselinux))
|
| 1753 | (arguments
|
| 1754 | (list #:configure-flags
|
| 1755 | #~(list (string-append "-Ddoc-path=" #$output "/share/doc/"
|
| 1756 | #$name "-" #$version)
|
| 1757 | "-Ddistrosysconfdir=/etc"
|
| 1758 | "-Dinit-script=sysvinit"
|
| 1759 | "-Dinstall-state-dirs=false"
|
| 1760 | "-Dinstall-init-files=false"
|
| 1761 | "-Dspecfile=false"
|
| 1762 | "-Db_lto=false")))
|
| 1763 | (synopsis "Linux container tools")
|
| 1764 | (home-page "https://linuxcontainers.org/")
|
| 1765 | (description
|
| 1766 | "LXC is a userspace interface for the Linux kernel containment features.
|
| 1767 | Through a powerful API and simple tools, it lets Linux users easily create and
|
| 1768 | manage system or application containers.")
|
| 1769 | (license license:lgpl2.1+)))
|
| 1770 |
|
| 1771 | (define-public lxcfs
|
| 1772 | (package
|
| 1773 | (name "lxcfs")
|
| 1774 | (version "5.0.4")
|
| 1775 | (home-page "https://github.com/lxc/lxcfs")
|
| 1776 | (source
|
| 1777 | (origin
|
| 1778 | (method git-fetch)
|
| 1779 | (uri (git-reference (url home-page)
|
| 1780 | (commit (string-append "lxcfs-" version))))
|
| 1781 | (file-name (git-file-name name version))
|
| 1782 | (sha256
|
| 1783 | (base32 "15cc7kvnln4qqlv22hprfzmq89jbkx7yra730hap8wkvamn33sxy"))))
|
| 1784 | (build-system meson-build-system)
|
| 1785 | (arguments
|
| 1786 | (list
|
| 1787 | #:configure-flags
|
| 1788 | #~(list "-Dinit-script=sysvinit"))) |
| 1789 | (native-inputs
|
| 1790 | (list help2man pkg-config python python-jinja2))
|
| 1791 | (inputs
|
| 1792 | (list fuse))
|
| 1793 | (synopsis "FUSE-based file system for LXC")
|
| 1794 | (description "LXCFS is a small FUSE file system written with the intention
|
| 1795 | of making Linux containers feel more like a virtual machine.
|
| 1796 | It started as a side project of LXC but can be used by any run-time.")
|
| 1797 | (license license:lgpl2.1+)))
|
| 1798 |
|
| 1799 | (define-public libvirt
|
| 1800 | (package
|
| 1801 | (name "libvirt")
|
| 1802 | (version "11.5.0")
|
| 1803 | (source
|
| 1804 | (origin
|
| 1805 | (method url-fetch)
|
| 1806 | (uri (string-append "https://libvirt.org/sources/libvirt-"
|
| 1807 | version ".tar.xz"))
|
| 1808 | (sha256
|
| 1809 | (base32 "08r4sxchhh639a8h346795971zz615j86v9z9vxf5q9q0pbbjqrb"))
|
| 1810 | (patches (search-patches "libvirt-add-install-prefix.patch"
|
| 1811 | "libvirt-respect-modules-path.patch"))))
|
| 1812 | (build-system meson-build-system)
|
| 1813 | (arguments
|
| 1814 | (list
|
| 1815 | #:modules '((guix build meson-build-system)
|
| 1816 | (guix build utils)
|
| 1817 | (ice-9 format))
|
| 1818 | #:configure-flags
|
| 1819 | #~(list "-Ddriver_qemu=enabled"
|
| 1820 | "-Dqemu_user=nobody"
|
| 1821 | "-Dqemu_group=kvm"
|
| 1822 | "-Dstorage_disk=enabled"
|
| 1823 | "-Dstorage_dir=enabled"
|
| 1824 | "-Dpolkit=enabled"
|
| 1825 | |
| 1826 | |
| 1827 | "-Ddriver_remote=enabled"
|
| 1828 | "-Dnls=enabled" |
| 1829 | (string-append "-Ddocdir=" #$output "/share/doc/"
|
| 1830 | #$(package-name this-package) "-"
|
| 1831 | #$(package-version this-package))
|
| 1832 | "-Dbash_completion=enabled"
|
| 1833 | (string-append "-Dinstall_prefix=" #$output)
|
| 1834 | "--sysconfdir=/etc"
|
| 1835 | "--localstatedir=/var")
|
| 1836 | #:phases
|
| 1837 | #~(modify-phases %standard-phases
|
| 1838 | (add-after 'unpack 'skip-directory-confusion
|
| 1839 | (lambda _
|
| 1840 | |
| 1841 | (substitute* "scripts/meson-install-dirs.py"
|
| 1842 | (("destdir = .*")
|
| 1843 | "destdir = '/tmp'"))))
|
| 1844 | (add-after 'unpack 'patch-commands
|
| 1845 | (lambda* (#:key inputs #:allow-other-keys)
|
| 1846 | (let-syntax
|
| 1847 | ((patch-command-define
|
| 1848 | |
| 1849 | (lambda (x)
|
| 1850 | (syntax-case x ()
|
| 1851 | ((_ file command)
|
| 1852 | (with-syntax ((pattern (datum->syntax x 'pattern)))
|
| 1853 | #'(let ((pattern
|
| 1854 | (format #f "(#define ~:@(~a~) )\"~a\""
|
| 1855 | command command)))
|
| 1856 | (substitute* file
|
| 1857 | ((pattern dummy head)
|
| 1858 | (format
|
| 1859 | #f "~a~s" head
|
| 1860 | (search-input-file
|
| 1861 | inputs (string-append "sbin/"
|
| 1862 | command))))))))))))
|
| 1863 | (with-directory-excursion "src/util"
|
| 1864 | (patch-command-define "virdnsmasq.c" "dnsmasq")
|
| 1865 | (patch-command-define "virfirewall.h" "ebtables")
|
| 1866 | (patch-command-define "virfirewall.h" "iptables")
|
| 1867 | (patch-command-define "virfirewall.h" "ip6tables")
|
| 1868 | (patch-command-define "virfirewall.h" "nft")))))
|
| 1869 | (add-before 'configure 'disable-broken-tests
|
| 1870 | (lambda _
|
| 1871 | (let ((tests (list "commandtest" |
| 1872 | "networkxml2conftest" |
| 1873 | "qemuxml2argvtest" |
| 1874 | "virnetsockettest"))) |
| 1875 | (substitute* "tests/meson.build"
|
| 1876 | (((format #f ".*'name': '(~a)'.*" (string-join tests "|")))
|
| 1877 | "")))))
|
| 1878 | (add-before 'configure 'fix-test-data
|
| 1879 | (lambda* (#:key inputs #:allow-other-keys)
|
| 1880 | (substitute* (find-files "tests/qemuvhostuserdata/usr/libexec")
|
| 1881 | (("^cat") (search-input-file inputs "bin/cat"))))))))
|
| 1882 | (inputs
|
| 1883 | (list acl
|
| 1884 | attr
|
| 1885 | audit
|
| 1886 | curl
|
| 1887 | cyrus-sasl
|
| 1888 | dbus
|
| 1889 | dmidecode
|
| 1890 | dnsmasq
|
| 1891 | eudev
|
| 1892 | fuse
|
| 1893 | gnutls
|
| 1894 | iproute
|
| 1895 | iptables
|
| 1896 | json-c
|
| 1897 | libnl
|
| 1898 | libpcap
|
| 1899 | libpciaccess
|
| 1900 | libssh2 |
| 1901 | libtirpc |
| 1902 | libxml2
|
| 1903 | lvm2 |
| 1904 | nftables
|
| 1905 | openssl
|
| 1906 | parted
|
| 1907 | `(,util-linux "lib")
|
| 1908 | readline
|
| 1909 | yajl))
|
| 1910 | (native-inputs
|
| 1911 | (list bash-completion
|
| 1912 | gettext-minimal
|
| 1913 | libxslt
|
| 1914 | perl
|
| 1915 | pkg-config
|
| 1916 | polkit
|
| 1917 | python-wrapper
|
| 1918 | python-docutils |
| 1919 | rpcsvc-proto)) |
| 1920 | (home-page "https://libvirt.org")
|
| 1921 | (synopsis "Simple API for virtualization")
|
| 1922 | (description "Libvirt is a C toolkit to interact with the virtualization
|
| 1923 | capabilities of recent versions of Linux. The library aims at providing long
|
| 1924 | term stable C API initially for the Xen paravirtualization but should be able
|
| 1925 | to integrate other virtualization mechanisms if needed.")
|
| 1926 | (license license:lgpl2.1+)))
|
| 1927 |
|
| 1928 | (define-public libvirt-glib
|
| 1929 | (package
|
| 1930 | (name "libvirt-glib")
|
| 1931 | (version "5.0.0")
|
| 1932 | (source (origin
|
| 1933 | (method url-fetch)
|
| 1934 | (uri (string-append "ftp://libvirt.org/libvirt/glib/"
|
| 1935 | "libvirt-glib-" version ".tar.xz"))
|
| 1936 | (sha256
|
| 1937 | (base32
|
| 1938 | "12rv5wxa92iigqlb3ncza6m6995j8739nac7bmbs65i4713c7zlv"))))
|
| 1939 | (build-system meson-build-system)
|
| 1940 | (inputs
|
| 1941 | (list openssl cyrus-sasl lvm2 |
| 1942 | yajl))
|
| 1943 | (native-inputs
|
| 1944 | (list pkg-config intltool
|
| 1945 | `(,glib "bin") vala))
|
| 1946 | (propagated-inputs
|
| 1947 | |
| 1948 | (list glib libvirt libxml2 gobject-introspection))
|
| 1949 | (home-page "https://libvirt.org")
|
| 1950 | (synopsis "GLib wrapper around libvirt")
|
| 1951 | (description "libvirt-glib wraps the libvirt library to provide a
|
| 1952 | high-level object-oriented API better suited for glib-based applications, via
|
| 1953 | three libraries:
|
| 1954 |
|
| 1955 | @enumerate
|
| 1956 | @item libvirt-glib - GLib main loop integration & misc helper APIs
|
| 1957 | @item libvirt-gconfig - GObjects for manipulating libvirt XML documents
|
| 1958 | @item libvirt-gobject - GObjects for managing libvirt objects
|
| 1959 | @end enumerate
|
| 1960 | ")
|
| 1961 | (license license:lgpl2.1+)))
|
| 1962 |
|
| 1963 | (define-public python-libvirt
|
| 1964 | (package
|
| 1965 | (name "python-libvirt")
|
| 1966 | (version "11.5.0")
|
| 1967 | (source
|
| 1968 | (origin
|
| 1969 | (method url-fetch)
|
| 1970 | (uri (string-append "https://libvirt.org/sources/python/libvirt-python-"
|
| 1971 | version ".tar.gz"))
|
| 1972 | (sha256
|
| 1973 | (base32 "08xcnzmahmb72rv9cw8dxwnjmrdgmm5j4bbxpwsnhll9qsgdiak9"))))
|
| 1974 | (build-system pyproject-build-system)
|
| 1975 | (inputs
|
| 1976 | (list libvirt))
|
| 1977 | (propagated-inputs
|
| 1978 | (list python-lxml))
|
| 1979 | (native-inputs
|
| 1980 | (list pkg-config python-pytest python-setuptools python-wheel))
|
| 1981 | (home-page "https://libvirt.org")
|
| 1982 | (synopsis "Python bindings to libvirt")
|
| 1983 | (description "This package provides Python bindings to the libvirt
|
| 1984 | virtualization library.")
|
| 1985 | (properties
|
| 1986 | '((upstream-name . "libvirt-python")))
|
| 1987 | (license license:lgpl2.1+)))
|
| 1988 |
|
| 1989 | (define-public virt-manager
|
| 1990 | (package
|
| 1991 | (name "virt-manager")
|
| 1992 | (version "5.0.0")
|
| 1993 | (source (origin
|
| 1994 | (method url-fetch)
|
| 1995 | (uri (string-append "https://releases.pagure.org/" name
|
| 1996 | "/" name "-" version ".tar.xz"))
|
| 1997 | (sha256
|
| 1998 | (base32
|
| 1999 | "0jpqhc02ya55rr8bin734znasslwlff42ann9rsvv5y9w13ax2dw"))))
|
| 2000 | (build-system meson-build-system)
|
| 2001 | (arguments
|
| 2002 | (list
|
| 2003 | #:modules
|
| 2004 | '((ice-9 match)
|
| 2005 | (srfi srfi-1)
|
| 2006 | (srfi srfi-26)
|
| 2007 | (guix build meson-build-system)
|
| 2008 | (guix build utils))
|
| 2009 | #:glib-or-gtk? #t
|
| 2010 | #:phases
|
| 2011 | #~(modify-phases %standard-phases
|
| 2012 | (add-after 'unpack 'set-SOURCE_DIR
|
| 2013 | (lambda _
|
| 2014 | (setenv "SOURCE_DIR" (getcwd))))
|
| 2015 | (add-after 'unpack 'fix-default-uri
|
| 2016 | (lambda* (#:key inputs #:allow-other-keys)
|
| 2017 | (substitute* "virtManager/createconn.py"
|
| 2018 | (("/usr(/bin/qemu-system-\\*)" _ suffix)
|
| 2019 | (string-append #$(this-package-input "qemu") suffix)))))
|
| 2020 | (add-before 'glib-or-gtk-wrap 'wrap-more
|
| 2021 | (lambda* (#:key inputs #:allow-other-keys)
|
| 2022 | (let* ((paths (filter-map
|
| 2023 | (match-lambda
|
| 2024 | ((output . directory)
|
| 2025 | (let* ((girepodir (string-append
|
| 2026 | directory
|
| 2027 | "/lib/girepository-1.0")))
|
| 2028 | (and (file-exists? girepodir)
|
| 2029 | girepodir))))
|
| 2030 | inputs)))
|
| 2031 | (for-each (lambda (file)
|
| 2032 | (format #t "wrapping ~a~%" file)
|
| 2033 | (wrap-program file
|
| 2034 | `("GI_TYPELIB_PATH" prefix ,paths)
|
| 2035 | `("GUIX_PYTHONPATH" prefix
|
| 2036 | |
| 2037 | (,(getenv "GUIX_PYTHONPATH")))))
|
| 2038 | (find-files (string-append #$output "/bin"))))))
|
| 2039 | (replace 'check
|
| 2040 | (lambda* (#:key tests? #:allow-other-keys)
|
| 2041 | (with-directory-excursion (getenv "SOURCE_DIR")
|
| 2042 | (invoke "pytest" "-vvv"
|
| 2043 | "-k" (string-append
|
| 2044 | |
| 2045 | |
| 2046 | "not install_cdrom_url and "
|
| 2047 | "not testCLI0062virt_install and "
|
| 2048 | |
| 2049 | |
| 2050 | |
| 2051 | "not install_s390x_cdrom and "
|
| 2052 | "not install_many_devices and "
|
| 2053 | "not test_disk and "
|
| 2054 | "not virt_clone"))))))))
|
| 2055 | (native-inputs
|
| 2056 | (list cpio
|
| 2057 | gettext-minimal
|
| 2058 | `(,glib "bin") |
| 2059 | gobject-introspection
|
| 2060 | `(,gtk+ "bin") |
| 2061 | pkg-config
|
| 2062 | python-docutils |
| 2063 | python-pytest
|
| 2064 | xorriso))
|
| 2065 | (inputs
|
| 2066 | (list bash-minimal
|
| 2067 | dconf
|
| 2068 | gtk+
|
| 2069 | gtk-vnc
|
| 2070 | gtksourceview-4
|
| 2071 | libosinfo
|
| 2072 | libvirt
|
| 2073 | libvirt-glib
|
| 2074 | libxml2
|
| 2075 | python-minimal
|
| 2076 | python-libvirt
|
| 2077 | python-pycairo
|
| 2078 | python-pygobject
|
| 2079 | python-requests
|
| 2080 | qemu
|
| 2081 | spice-gtk
|
| 2082 | vte/gtk+-3))
|
| 2083 | (home-page "https://virt-manager.org/")
|
| 2084 | (synopsis "Manage virtual machines")
|
| 2085 | (description
|
| 2086 | "The virt-manager application is a desktop user interface for managing
|
| 2087 | virtual machines through libvirt. It primarily targets KVM VMs, but also
|
| 2088 | manages Xen and LXC (Linux containers). It presents a summary view of running
|
| 2089 | domains, their live performance and resource utilization statistics.")
|
| 2090 | (license license:gpl2+)))
|
| 2091 |
|
| 2092 | (define-public vmware-open-vm-tools
|
| 2093 | (package
|
| 2094 | (name "vmware-open-vm-tools")
|
| 2095 | (version "13.1.0")
|
| 2096 | (source
|
| 2097 | (origin
|
| 2098 | (method git-fetch)
|
| 2099 | (uri (git-reference
|
| 2100 | (url "https://github.com/vmware/open-vm-tools")
|
| 2101 | (commit (string-append "stable-" version))))
|
| 2102 | (file-name (git-file-name name version))
|
| 2103 | (sha256
|
| 2104 | (base32 "0dzzj240nh0f0fjsnh0kd622h7ia2dvh4hw7mr2nb652krd20cjw"))))
|
| 2105 | (build-system gnu-build-system)
|
| 2106 | (arguments
|
| 2107 | (list
|
| 2108 | #:configure-flags
|
| 2109 | #~(list "--with-fuse=fuse3"
|
| 2110 | "--with-dnet"
|
| 2111 | "--without-kernel-modules"
|
| 2112 | "--without-x"
|
| 2113 | (string-append
|
| 2114 | "--with-udev-rules-dir=" #$output "/lib/udev/rules.d"))
|
| 2115 | |
| 2116 | #:phases
|
| 2117 | #~(modify-phases %standard-phases
|
| 2118 | (add-after 'unpack 'chdir
|
| 2119 | (lambda _
|
| 2120 | (chdir "open-vm-tools")))
|
| 2121 | (replace 'bootstrap
|
| 2122 | (lambda _
|
| 2123 | (system* "autoreconf" "-if")))
|
| 2124 | (add-after 'bootstrap 'patch-paths
|
| 2125 | (lambda _
|
| 2126 | (substitute* "Makefile.am"
|
| 2127 | (("/etc/vmware-tools/")
|
| 2128 | (string-append #$output "/etc/vmware-tools/")))
|
| 2129 | (substitute* "scripts/Makefile.am"
|
| 2130 | (("/etc/vmware-tools")
|
| 2131 | (string-append #$output "/etc/vmware-tools"))
|
| 2132 | (("/usr/bin")
|
| 2133 | (string-append #$output "/bin")))
|
| 2134 | (substitute* "services/vmtoolsd/Makefile.am"
|
| 2135 | (("/etc/vmware-tools")
|
| 2136 | (string-append #$output "/etc/vmware-tools"))
|
| 2137 | (("\\$\\(PAM_PREFIX\\)")
|
| 2138 | (string-append #$output "/$(PAM_PREFIX)")))
|
| 2139 | (substitute* "vgauth/service/Makefile.am"
|
| 2140 | (("/etc/vmware-tools/vgauth/schemas")
|
| 2141 | (string-append #$output "/etc/vmware-tools/vgauth/schemas"))
|
| 2142 | (("etc/vmware-tools/vgauth.conf")
|
| 2143 | (string-append #$output "/etc/vmware-tools/vgauth.conf")))
|
| 2144 | (substitute* "vmhgfs-fuse/config.c"
|
| 2145 | (("/bin/fusermount3")
|
| 2146 | (string-append
|
| 2147 | #$(this-package-input "fuse") "/bin/fusermount3")))
|
| 2148 | (substitute* "lib/guestApp/guestApp.c"
|
| 2149 | (("/etc/vmware-tools")
|
| 2150 | (string-append #$output "/etc/vmware-tools")))
|
| 2151 | |
| 2152 | |
| 2153 | (substitute* "lib/system/systemLinux.c"
|
| 2154 | (("/sbin/shutdown")
|
| 2155 | (string-append
|
| 2156 | #$(this-package-input "shepherd") "/sbin/shutdown"))
|
| 2157 | (("/bin/reboot")
|
| 2158 | (string-append
|
| 2159 | #$(this-package-input "shepherd") "/sbin/reboot")))
|
| 2160 | (substitute* "services/plugins/vix/foundryToolsDaemon.c"
|
| 2161 | (("/bin/mount")
|
| 2162 | (string-append
|
| 2163 | #$(this-package-input "util-linux") "/bin/mount"))
|
| 2164 | (("/usr/bin/vmhgfs-fuse")
|
| 2165 | (string-append #$output "/bin/vmhgfs-fuse"))))))))
|
| 2166 | (native-inputs
|
| 2167 | (list `(,glib "bin") |
| 2168 | autoconf
|
| 2169 | automake
|
| 2170 | libltdl
|
| 2171 | libtool
|
| 2172 | pkg-config))
|
| 2173 | (inputs
|
| 2174 | (list eudev
|
| 2175 | fuse
|
| 2176 | glib
|
| 2177 | xmlsec-openssl
|
| 2178 | libmspack
|
| 2179 | libdnet
|
| 2180 | libtirpc
|
| 2181 | libxcrypt
|
| 2182 | libxml2
|
| 2183 | linux-pam
|
| 2184 | openssl
|
| 2185 | procps
|
| 2186 | rpcsvc-proto
|
| 2187 | shepherd |
| 2188 | util-linux))
|
| 2189 | (home-page "https://github.com/vmware/open-vm-tools")
|
| 2190 | (synopsis "Tools for VMWare guest VM to enhance host-guest integration")
|
| 2191 | (description
|
| 2192 | "@code{open-vm-tools} is a set of services and modules that enable several
|
| 2193 | features in VMware products for better management of, and seamless user
|
| 2194 | interactions with, guests.
|
| 2195 |
|
| 2196 | @code{open-vm-tools} enables the following features in VMware products:
|
| 2197 |
|
| 2198 | @itemize
|
| 2199 | @item The ability to perform virtual machine power operations gracefully.
|
| 2200 | @item Execution of VMware provided or user configured scripts in guests during
|
| 2201 | various power operations.
|
| 2202 | @item The ability to run programs, commands and file system operation in guests
|
| 2203 | to enhance guest automation.
|
| 2204 | @item Authentication for guest operations.
|
| 2205 | @item Periodic collection of network, disk, and memory usage information from
|
| 2206 | the guest.
|
| 2207 | @item Generation of heartbeat from guests to hosts so VMware's HA solution can
|
| 2208 | determine guests' availability.
|
| 2209 | @item Clock synchronization between guests and hosts or client desktops.
|
| 2210 | @item Quiescing guest file systems to allow hosts to capture
|
| 2211 | file-system-consistent guest snapshots.
|
| 2212 | @item Execution of pre-freeze and post-thaw scripts while quiescing guest file
|
| 2213 | systems.
|
| 2214 | @item The ability to customize guest operating systems immediately after
|
| 2215 | powering on virtual machines.
|
| 2216 | @item Enabling shared folders between host and guest file systems on VMware
|
| 2217 | Workstation and VMware Fusion.
|
| 2218 | @item Copying and pasting text, graphics, and files between guests and hosts or
|
| 2219 | client desktops.
|
| 2220 | @end itemize")
|
| 2221 | (license license:gpl2)))
|
| 2222 |
|
| 2223 | (define-public vmware-open-vm-tools-gtk
|
| 2224 | (package/inherit vmware-open-vm-tools
|
| 2225 | (name "vmware-open-vm-tools-gtk")
|
| 2226 | (inputs
|
| 2227 | (modify-inputs inputs
|
| 2228 | (prepend gdk-pixbuf-xlib
|
| 2229 | gtk+
|
| 2230 | gtkmm
|
| 2231 | libdrm
|
| 2232 | libx11
|
| 2233 | libxext
|
| 2234 | libxi
|
| 2235 | libxinerama
|
| 2236 | libxrandr
|
| 2237 | libxrender
|
| 2238 | libxtst)))
|
| 2239 | (arguments
|
| 2240 | (substitute-keyword-arguments arguments
|
| 2241 | ((#:configure-flags flags)
|
| 2242 | #~(delete "--without-x" #$flags))))
|
| 2243 | (description "This package provides a GTK+ support for @code{open-vm-tools}.")))
|
| 2244 |
|
| 2245 | (define-public criu
|
| 2246 | (package
|
| 2247 | (name "criu")
|
| 2248 | (version "4.0")
|
| 2249 | (source
|
| 2250 | (origin
|
| 2251 | (method git-fetch)
|
| 2252 | (uri (git-reference
|
| 2253 | (url "https://github.com/checkpoint-restore/criu")
|
| 2254 | (commit (string-append "v" version))))
|
| 2255 | (file-name (git-file-name name version))
|
| 2256 | (sha256
|
| 2257 | (base32 "0p46z5iclyvvg1arvqhl3bdg1g2mny0pxyz6pr5n87cnj7maqphg"))))
|
| 2258 | (build-system gnu-build-system)
|
| 2259 | (arguments
|
| 2260 | (list
|
| 2261 | #:test-target "test"
|
| 2262 | #:tests? #f |
| 2263 | #:make-flags
|
| 2264 | #~(list (string-append "PREFIX=" #$output)
|
| 2265 | (string-append "LIBDIR=$(PREFIX)/lib")
|
| 2266 | |
| 2267 | |
| 2268 | |
| 2269 | (string-append "PLUGINDIR=$(LIBDIR)/criu")
|
| 2270 | (string-append "ASCIIDOC="
|
| 2271 | (search-input-file %build-inputs "/bin/asciidoc"))
|
| 2272 | (string-append "PYTHON=python3")
|
| 2273 | (string-append "XMLTO="
|
| 2274 | (search-input-file %build-inputs "/bin/xmlto")))
|
| 2275 | #:modules '((guix build gnu-build-system)
|
| 2276 | (guix build utils)
|
| 2277 | ((guix build pyproject-build-system) #:prefix py:))
|
| 2278 | #:imported-modules (append %default-gnu-imported-modules
|
| 2279 | %pyproject-build-system-modules)
|
| 2280 | #:phases
|
| 2281 | #~(modify-phases %standard-phases
|
| 2282 | (delete 'configure) |
| 2283 | (add-after 'unpack 'hardcode-variables
|
| 2284 | (lambda* (#:key inputs outputs #:allow-other-keys)
|
| 2285 | |
| 2286 | (substitute* "Makefile"
|
| 2287 | (("ARMV.*:=.*") "ARMV := 7\n")
|
| 2288 | (("^head-name :=.*")
|
| 2289 | (string-append "head-name := " #$version "\n")))
|
| 2290 | |
| 2291 | (substitute* "Makefile.install"
|
| 2292 | (("SKIP_PIP_INSTALL.*:=.*") "SKIP_PIP_INSTALL := 1\n"))
|
| 2293 | |
| 2294 | (substitute* "criu/include/plugin.h"
|
| 2295 | (("/var") #$output))))
|
| 2296 | (add-after 'unpack 'ensure-no-mtimes-pre-1980
|
| 2297 | py:ensure-no-mtimes-pre-1980)
|
| 2298 | (add-before 'build 'fix-symlink
|
| 2299 | (lambda* (#:key inputs #:allow-other-keys)
|
| 2300 | |
| 2301 | |
| 2302 | (let* ((file "google/protobuf/descriptor.proto")
|
| 2303 | (target (string-append "images/" file))
|
| 2304 | (source (search-input-file
|
| 2305 | inputs
|
| 2306 | (string-append "include/" file))))
|
| 2307 | (delete-file target)
|
| 2308 | (symlink source target))))
|
| 2309 | (add-after 'install 'wrap
|
| 2310 | (lambda* (#:key inputs outputs #:allow-other-keys)
|
| 2311 | |
| 2312 | (let* ((site (py:site-packages inputs outputs))
|
| 2313 | (path (getenv "GUIX_PYTHONPATH")))
|
| 2314 | |
| 2315 | (for-each (lambda (dir)
|
| 2316 | (with-directory-excursion dir
|
| 2317 | (setenv "GUIX_PYTHONPATH"
|
| 2318 | (string-append site ":" path))
|
| 2319 | (invoke "python3" "setup.py" "install"
|
| 2320 | (string-append "--prefix=" #$output)
|
| 2321 | "--no-compile" "--root=/"
|
| 2322 | "--single-version-externally-managed")))
|
| 2323 | (list "lib" "crit"))
|
| 2324 | (wrap-program (string-append #$output "/bin/crit")
|
| 2325 | `("GUIX_PYTHONPATH" ":" prefix (,site ,path))))))
|
| 2326 | (add-after 'install 'delete-static-libraries
|
| 2327 | |
| 2328 | (lambda* (#:key outputs #:allow-other-keys)
|
| 2329 | (for-each delete-file (find-files #$output "\\.a$")))))))
|
| 2330 | (inputs
|
| 2331 | (list bash-minimal
|
| 2332 | protobuf
|
| 2333 | python-protobuf
|
| 2334 | iproute
|
| 2335 | libaio
|
| 2336 | libcap
|
| 2337 | libnet
|
| 2338 | libnl
|
| 2339 | libbsd
|
| 2340 | nftables))
|
| 2341 | (native-inputs
|
| 2342 | (list pkg-config
|
| 2343 | perl
|
| 2344 | asciidoc
|
| 2345 | xmlto
|
| 2346 | docbook-xml
|
| 2347 | docbook-xsl
|
| 2348 | python-wrapper
|
| 2349 | python-setuptools))
|
| 2350 | (propagated-inputs
|
| 2351 | |
| 2352 | (list protobuf-c))
|
| 2353 | (home-page "https://criu.org")
|
| 2354 | (synopsis "Checkpoint and restore in user space")
|
| 2355 | (description "Using this tool, you can freeze a running application (or
|
| 2356 | part of it) and checkpoint it to a hard drive as a collection of files. You
|
| 2357 | can then use the files to restore and run the application from the point it
|
| 2358 | was frozen at. The distinctive feature of the CRIU project is that it is
|
| 2359 | mainly implemented in user space.")
|
| 2360 | |
| 2361 | |
| 2362 | (license (list license:gpl2 license:lgpl2.1))))
|
| 2363 |
|
| 2364 | (define-public python-qemu-qmp
|
| 2365 | (package
|
| 2366 | (name "python-qemu-qmp")
|
| 2367 | (version "0.0.0a0")
|
| 2368 | (source
|
| 2369 | (origin
|
| 2370 | (method url-fetch)
|
| 2371 | (uri (pypi-uri "qemu.qmp" version))
|
| 2372 | (sha256
|
| 2373 | (base32 "1rpsbiwvngij6fjcc5cx1azcc4dxmm080crr31wc7jrm7i61p7c2"))))
|
| 2374 | (build-system pyproject-build-system)
|
| 2375 | (arguments
|
| 2376 | (list
|
| 2377 | #:phases
|
| 2378 | #~(modify-phases %standard-phases
|
| 2379 | (replace 'check
|
| 2380 | (lambda* (#:key tests? #:allow-other-keys)
|
| 2381 | (if tests?
|
| 2382 | (begin |
| 2383 | (setenv "HOME" "/tmp")
|
| 2384 | (invoke "avocado" "--show=all" "run" "tests/protocol.py"))
|
| 2385 | (format #t "test suite not run~%")))))))
|
| 2386 | (native-inputs
|
| 2387 | (list python-avocado-framework
|
| 2388 | python-flake8
|
| 2389 | python-setuptools
|
| 2390 | python-setuptools-scm
|
| 2391 | python-wheel))
|
| 2392 | (propagated-inputs
|
| 2393 | (list python-pygments
|
| 2394 | python-urwid
|
| 2395 | python-urwid-readline))
|
| 2396 | (home-page "https://gitlab.com/jsnow/qemu.qmp")
|
| 2397 | (synopsis "QEMU Monitor Protocol Python library")
|
| 2398 | (description "@code{emu.qmp} is a
|
| 2399 | @url{https://gitlab.com/qemu-project/qemu/-/blob/master/docs/interop/qmp-intro.txt,
|
| 2400 | QEMU Monitor Protocol (QMP)} library written in Python. It is used to send
|
| 2401 | QMP messages to running QEMU emulators. It can be used to communicate with
|
| 2402 | QEMU emulators, the QEMU Guest Agent (QGA), the QEMU Storage Daemon (QSD), or
|
| 2403 | any other utility or application that speaks QMP.")
|
| 2404 | (license license:gpl2+)))
|
| 2405 |
|
| 2406 | (define-public qmpbackup
|
| 2407 | (package
|
| 2408 | (name "qmpbackup")
|
| 2409 | (version "0.52")
|
| 2410 | (source
|
| 2411 | (origin
|
| 2412 | (method git-fetch)
|
| 2413 | (uri (git-reference
|
| 2414 | (url "https://github.com/abbbi/qmpbackup")
|
| 2415 | (commit (string-append "v" version))))
|
| 2416 | (file-name (git-file-name name version))
|
| 2417 | (sha256
|
| 2418 | (base32 "0wf9ryc7jiwkkqjpl1y5k814zzr0cbxib2ivl6lvs8vnq6pgbzw6"))))
|
| 2419 | (build-system pyproject-build-system)
|
| 2420 | |
| 2421 | (arguments (list #:tests? #f))
|
| 2422 | (native-inputs (list python-setuptools))
|
| 2423 | (inputs (list python-qemu-qmp))
|
| 2424 | (home-page "https://github.com/abbbi/qmpbackup")
|
| 2425 | (synopsis "Backup and restore QEMU machines")
|
| 2426 | (description
|
| 2427 | "@command{qmpbackup} is designed to create and restore full and
|
| 2428 | incremental backups of running QEMU virtual machines via QMP, the QEMU Machine
|
| 2429 | Protocol.")
|
| 2430 | (license license:gpl3+)))
|
| 2431 |
|
| 2432 | (define-public looking-glass-client
|
| 2433 | (package
|
| 2434 | (name "looking-glass-client")
|
| 2435 | (version "B7")
|
| 2436 | (source (origin
|
| 2437 | (method url-fetch)
|
| 2438 | (uri (string-append "https://looking-glass.io/artifact/" version
|
| 2439 | "/source"))
|
| 2440 | (file-name (string-append name "-" version ".tar.gz"))
|
| 2441 | (sha256
|
| 2442 | (base32
|
| 2443 | "11crsvy783ig7kzmr2cr68wv9zsjkcbp1akcs28rc6yc1ik0dr89"))))
|
| 2444 | (build-system cmake-build-system)
|
| 2445 | (inputs (list bash-minimal
|
| 2446 | font-dejavu
|
| 2447 | fontconfig
|
| 2448 | freetype
|
| 2449 | glu
|
| 2450 | gmp
|
| 2451 | libglvnd
|
| 2452 | libiberty
|
| 2453 | libsamplerate
|
| 2454 | libx11
|
| 2455 | libxcursor
|
| 2456 | libxfixes
|
| 2457 | libxi
|
| 2458 | libxinerama
|
| 2459 | libxkbcommon
|
| 2460 | libxpresent
|
| 2461 | libxrandr
|
| 2462 | libxscrnsaver
|
| 2463 | mesa
|
| 2464 | pipewire
|
| 2465 | pulseaudio
|
| 2466 | spice-protocol
|
| 2467 | wayland
|
| 2468 | wayland-protocols
|
| 2469 | `(,zlib "static")))
|
| 2470 | (native-inputs (list nettle pkg-config))
|
| 2471 | (arguments
|
| 2472 | (list #:tests? #f |
| 2473 | |
| 2474 | |
| 2475 | #:configure-flags #~'("-DOPTIMIZE_FOR_NATIVE=OFF"
|
| 2476 | "-DENABLE_BACKTRACE=no")
|
| 2477 | #:make-flags #~'("CC=gcc")
|
| 2478 | #:phases #~(modify-phases %standard-phases
|
| 2479 | (add-before 'configure 'chdir-to-client
|
| 2480 | (lambda* (#:key outputs #:allow-other-keys)
|
| 2481 | (chdir "client")))
|
| 2482 | (replace 'install
|
| 2483 | (lambda* (#:key outputs #:allow-other-keys)
|
| 2484 | (install-file "looking-glass-client"
|
| 2485 | (string-append (assoc-ref outputs
|
| 2486 | "out")
|
| 2487 | "/bin"))))
|
| 2488 | (add-after 'install 'wrapper
|
| 2489 | (lambda* (#:key inputs outputs #:allow-other-keys)
|
| 2490 | (wrap-program (string-append (assoc-ref outputs
|
| 2491 | "out")
|
| 2492 | "/bin/looking-glass-client")
|
| 2493 | `("LD_LIBRARY_PATH" ":" prefix
|
| 2494 | ,(map (lambda (name)
|
| 2495 | (let ((input (assoc-ref inputs name)))
|
| 2496 | (string-append input "/lib")))
|
| 2497 | '("gmp" "libxi"
|
| 2498 | "nettle"
|
| 2499 | "mesa"
|
| 2500 | "wayland"
|
| 2501 | "fontconfig-minimal"
|
| 2502 | "freetype"
|
| 2503 | "libx11"
|
| 2504 | "libxfixes"
|
| 2505 | "libxscrnsaver"
|
| 2506 | "libxinerama")))))))))
|
| 2507 | (home-page "https://looking-glass.io/")
|
| 2508 | (synopsis "KVM Frame Relay (KVMFR) implementation")
|
| 2509 | (description
|
| 2510 | "Looking Glass allows the use of a KVM (Kernel-based Virtual
|
| 2511 | Machine) configured for VGA PCI Pass-through without an attached physical
|
| 2512 | monitor, keyboard or mouse. It displays the VM's rendered contents on your
|
| 2513 | main monitor/GPU.")
|
| 2514 | |
| 2515 | (supported-systems '("i686-linux" "x86_64-linux"))
|
| 2516 | (license license:gpl2+)))
|
| 2517 |
|
| 2518 | |
| 2519 | (define-deprecated/public-alias runc (@ (gnu packages containers) runc))
|
| 2520 |
|
| 2521 | |
| 2522 | (define-deprecated/public-alias umoci (@ (gnu packages containers) umoci))
|
| 2523 |
|
| 2524 | |
| 2525 | (define-deprecated/public-alias skopeo (@ (gnu packages containers) skopeo))
|
| 2526 |
|
| 2527 | (define-public ruby-vagrant-spec-helper-basic
|
| 2528 | (package
|
| 2529 | (name "ruby-vagrant-spec-helper-basic")
|
| 2530 | (version "0.2.0")
|
| 2531 | (source (origin
|
| 2532 | (method url-fetch)
|
| 2533 | (uri (rubygems-uri "vagrant-spec-helper-basic" version))
|
| 2534 | (sha256
|
| 2535 | (base32
|
| 2536 | "1qhxxc07dhrma1s1x2g9sma7xxgwzs20s6v5pv9jrpz6bl4b527n"))))
|
| 2537 | (build-system ruby-build-system)
|
| 2538 | (arguments
|
| 2539 | (list #:tests? #f)) |
| 2540 | (synopsis "Helper for vagrant-spec")
|
| 2541 | (description "This package is an internal helper for vagrant-spec. Don't
|
| 2542 | use it.")
|
| 2543 | (home-page "https://github.com/hashicorp/vagrant-spec")
|
| 2544 | (license license:mpl2.0)))
|
| 2545 |
|
| 2546 | (define-public ruby-vagrant-spec
|
| 2547 | (package
|
| 2548 | (name "ruby-vagrant-spec")
|
| 2549 | (version "0.0.6")
|
| 2550 | (source (origin
|
| 2551 | (method url-fetch)
|
| 2552 | (uri (rubygems-uri "vagrant_spec" version))
|
| 2553 | (sha256
|
| 2554 | (base32
|
| 2555 | "1bkzz3mj7kzsv6k0ii8w31cgkpiqw3wvmvv2c6rknsavqqnagb4g"))))
|
| 2556 | (build-system ruby-build-system)
|
| 2557 | |
| 2558 | (propagated-inputs (list ruby-coveralls ruby-serverspec))
|
| 2559 | (arguments
|
| 2560 | (list
|
| 2561 | #:tests? #f |
| 2562 | |
| 2563 | #:test-target "unit"
|
| 2564 | #:phases
|
| 2565 | #~(modify-phases %standard-phases
|
| 2566 | (add-after 'unpack 'patch
|
| 2567 | (lambda _
|
| 2568 | (substitute* "Rakefile"
|
| 2569 | (("Bundler::GemHelper") "require 'bundler'\nBundler::GemHelper"))))
|
| 2570 | (add-before 'check 'prepare-check
|
| 2571 | (lambda _
|
| 2572 | (setenv "HOME" "/tmp"))))))
|
| 2573 | (synopsis "Specification and tests for Vagrant")
|
| 2574 | (description "@code{vagrant-spec} is a both a specification of how Vagrant
|
| 2575 | and its various components should behave as well as a library of testing
|
| 2576 | helpers that let you write your own unit and acceptance tests for Vagrant.")
|
| 2577 | (home-page "https://github.com/hashicorp/vagrant-spec")
|
| 2578 | (license license:mpl2.0)))
|
| 2579 |
|
| 2580 | (define-public vagrant
|
| 2581 | (package
|
| 2582 | (name "vagrant")
|
| 2583 | (version "2.3.7") |
| 2584 | (source (origin
|
| 2585 | (method git-fetch)
|
| 2586 | (uri (git-reference
|
| 2587 | (url "https://github.com/hashicorp/vagrant")
|
| 2588 | (commit (string-append "v" version))))
|
| 2589 | (file-name (git-file-name name version))
|
| 2590 | (sha256
|
| 2591 | (base32
|
| 2592 | "0c674c5v70skh38lpydz8cdmcp8wgr9h7rn00rxdpgizrzbfxl82"))
|
| 2593 | (patches (search-patches
|
| 2594 | "vagrant-bin-vagrant-silence-warning-about-installer.patch"
|
| 2595 | "vagrant-Support-system-installed-plugins.patch"
|
| 2596 | "vagrant-Use-a-private-temporary-dir.patch"))))
|
| 2597 | (build-system ruby-build-system)
|
| 2598 | (arguments
|
| 2599 | (list
|
| 2600 | #:tests? #f |
| 2601 | #:phases
|
| 2602 | #~(modify-phases %standard-phases
|
| 2603 | (add-after 'unpack 'patch-gemfile
|
| 2604 | (lambda _
|
| 2605 | (substitute* "Gemfile"
|
| 2606 | ((", git:.*") "\n"))))
|
| 2607 | (add-after 'unpack 'pin-executables
|
| 2608 | (lambda* (#:key inputs outputs #:allow-other-keys)
|
| 2609 | (let* ((bsdtar (search-input-file inputs "/bin/bsdtar"))
|
| 2610 | (curl (search-input-file inputs "/bin/curl"))
|
| 2611 | (dnsmasq (search-input-file inputs "/sbin/dnsmasq"))
|
| 2612 | (grep (search-input-file inputs "/bin/grep"))
|
| 2613 | (modinfo (search-input-file inputs "/bin/modinfo"))
|
| 2614 | (ps (search-input-file inputs "/bin/ps")))
|
| 2615 | |
| 2616 | (for-each
|
| 2617 | (lambda (rbfile)
|
| 2618 | (substitute* rbfile
|
| 2619 | (("\"bsdtar\",") (string-append "\"" bsdtar "\","))))
|
| 2620 | (find-files "lib/vagrant/" "\\.rb$"))
|
| 2621 | |
| 2622 | (substitute* "lib/vagrant/util/downloader.rb"
|
| 2623 | (("\"curl\",") (string-append "\"" curl "\",")))
|
| 2624 | (substitute* "lib/vagrant/util/uploader.rb"
|
| 2625 | (("\"curl\",") (string-append "\"" curl "\",")))
|
| 2626 | (substitute* "plugins/hosts/linux/cap/nfs.rb"
|
| 2627 | |
| 2628 | (("\\| grep #\\{nfs_service")
|
| 2629 | (string-append "| " grep " #{nfs_service"))
|
| 2630 | (("\"grep\",") (string-append "\"" grep "\","))
|
| 2631 | |
| 2632 | (("Vagrant::Util::Which.which\\(\"modinfo\"\\)")
|
| 2633 | (string-append "\"" modinfo "\"")))
|
| 2634 | |
| 2635 | |
| 2636 | |
| 2637 | |
| 2638 | |
| 2639 | |
| 2640 | |
| 2641 | (substitute* "lib/vagrant/util/platform.rb"
|
| 2642 | (("\"ps\",") (string-append "\"" ps "\","))))))
|
| 2643 | (add-after 'extract-gemspec 'relax-requirements
|
| 2644 | (lambda _
|
| 2645 | (substitute* "vagrant.gemspec"
|
| 2646 | |
| 2647 | (("s\\.required_ruby_version ") "# s.required_ruby_version ")
|
| 2648 | (("dependency \"rgl\", \"~> 0.5.10\"")
|
| 2649 | "dependency \"rgl\"")
|
| 2650 | (("dependency \"vagrant_cloud\", \"~> 3.0.5\"")
|
| 2651 | "dependency \"vagrant_cloud\"")
|
| 2652 | (("dependency \"rexml\", .*")
|
| 2653 | "dependency \"rexml\"\n")
|
| 2654 | |
| 2655 | ((".*dependency \"(wdm|winrm(|-elevated|-fs))\".*") "")
|
| 2656 | |
| 2657 | ((".*dependency \"rb-kqueue\".*") "")
|
| 2658 | |
| 2659 | (("^ gitignore_path = " line)
|
| 2660 | (string-append
|
| 2661 | "all_files.reject! { |file| file.match?(\"vagrant-.*\\.gem\") }\n"
|
| 2662 | line))))))))
|
| 2663 | (native-search-paths
|
| 2664 | (list (search-path-specification
|
| 2665 | (variable "GUIX_VAGRANT_PLUGINS_PATH")
|
| 2666 | (files '("share/vagrant-plugins")))))
|
| 2667 | |
| 2668 | |
| 2669 | (native-inputs (list ruby-fake-ftp ruby-webrick bundler ruby-vagrant-spec))
|
| 2670 | (inputs (list curl dnsmasq grep kmod libarchive openssh procps))
|
| 2671 | (propagated-inputs
|
| 2672 | (list ruby-bcrypt-pbkdf ruby-childprocess ruby-ed25519 ruby-erubi
|
| 2673 | ruby-googleapis-common-protos-types ruby-grpc
|
| 2674 | ruby-hashicorp-checkpoint ruby-i18n ruby-listen ruby-log4r
|
| 2675 | ruby-mime-types ruby-net-ftp ruby-net-ssh ruby-net-sftp
|
| 2676 | ruby-net-scp ruby-ipaddr ruby-rexml ruby-rgl ruby-rubyzip
|
| 2677 | ruby-vagrant-cloud ruby-vagrant-spec))
|
| 2678 | (synopsis "Build and distribute virtualized development environments")
|
| 2679 | (description "Vagrant is the command line utility for managing the
|
| 2680 | lifecycle of virtual machines. Isolate dependencies and their configuration
|
| 2681 | within a single disposable and consistent environment.
|
| 2682 |
|
| 2683 | Note: Make sure to have @code{ssh} and @code{rsync} installed — if you use the
|
| 2684 | respective Vagrant functions. This package does not link to any specific
|
| 2685 | implementation of these to allow different clients and to avoid configuration
|
| 2686 | conflicts when running on a `foreign distribution'.")
|
| 2687 | (home-page "https://www.vagrantup.com")
|
| 2688 | |
| 2689 | (properties '((lint-hidden-cve . ("CVE-2021-21361"))))
|
| 2690 | (license license:bsd-3)))
|
| 2691 |
|
| 2692 | (define-public vagrant-cachier
|
| 2693 | (package
|
| 2694 | (name "vagrant-cachier")
|
| 2695 | (version "1.2.1")
|
| 2696 | (source (origin
|
| 2697 | (method url-fetch)
|
| 2698 | (uri (rubygems-uri "vagrant-cachier" version))
|
| 2699 | (sha256
|
| 2700 | (base32
|
| 2701 | "0v11nf2d2y2knwm4zackd5ap8h2927n8rc1q73b6ii4hndv98fh9"))))
|
| 2702 | (build-system ruby-build-system)
|
| 2703 | (arguments
|
| 2704 | (list
|
| 2705 | #:tests? #f |
| 2706 | #:phases
|
| 2707 | #~(modify-phases %standard-phases
|
| 2708 | (add-after 'install 'install-plugin.json
|
| 2709 | (lambda _
|
| 2710 | (let* ((plugins.d (string-append
|
| 2711 | #$output "/share/vagrant-plugins/plugins.d"))
|
| 2712 | (plugin.json (string-append
|
| 2713 | plugins.d "/" #$name ".json")))
|
| 2714 | (mkdir-p plugins.d)
|
| 2715 | #$(with-extensions (list guile-json-4)
|
| 2716 | #~(begin
|
| 2717 | (use-modules (json))
|
| 2718 | (call-with-output-file plugin.json
|
| 2719 | (lambda (port)
|
| 2720 | (scm->json
|
| 2721 | '((#$name
|
| 2722 | .
|
| 2723 | (("ruby_version"
|
| 2724 | . #$(package-version (this-package-input "ruby")))
|
| 2725 | ("vagrant_version"
|
| 2726 | . #$(package-version (this-package-input "vagrant")))
|
| 2727 | ("gem_version" . "")
|
| 2728 | ("require" . "")
|
| 2729 | ("installed_gem_version" . #$version)
|
| 2730 | ("sources" . #()))))
|
| 2731 | port)))))))))))
|
| 2732 | (inputs (list ruby vagrant))
|
| 2733 | (synopsis "Share a common package cache among similar VM instances")
|
| 2734 | (description "This package provides a Vagrant plugin that helps you reduce
|
| 2735 | the amount of coffee you drink while waiting for boxes to be provisioned by
|
| 2736 | sharing a common package cache among similar VM instances. Kinda like
|
| 2737 | vagrant-apt_cache or this magical snippet but targeting multiple package
|
| 2738 | managers and Linux distros.")
|
| 2739 | (home-page "https://github.com/fgrehm/vagrant-cachier")
|
| 2740 | (license license:expat)))
|
| 2741 |
|
| 2742 | (define-public vagrant-libvirt
|
| 2743 | (package
|
| 2744 | (name "vagrant-libvirt")
|
| 2745 | (version "0.12.2")
|
| 2746 | (source (origin
|
| 2747 | (method url-fetch)
|
| 2748 | (uri (rubygems-uri "vagrant-libvirt" version))
|
| 2749 | (sha256
|
| 2750 | (base32
|
| 2751 | "013g6wn24k01lwwkzcb0vvxj959lws8c52bkyqi6b8shnn793j1l"))))
|
| 2752 | (build-system ruby-build-system)
|
| 2753 | (arguments
|
| 2754 | (list
|
| 2755 | #:tests? #f |
| 2756 | |
| 2757 | #:phases
|
| 2758 | #~(modify-phases %standard-phases
|
| 2759 | (add-after 'install 'install-plugin.json
|
| 2760 | (lambda _
|
| 2761 | (let* ((plugins.d (string-append
|
| 2762 | #$output "/share/vagrant-plugins/plugins.d"))
|
| 2763 | (plugin.json (string-append
|
| 2764 | plugins.d "/" #$name ".json")))
|
| 2765 | (mkdir-p plugins.d)
|
| 2766 | #$(with-extensions (list guile-json-4)
|
| 2767 | #~(begin
|
| 2768 | (use-modules (json))
|
| 2769 | (call-with-output-file plugin.json
|
| 2770 | (lambda (port)
|
| 2771 | (scm->json
|
| 2772 | '((#$name
|
| 2773 | .
|
| 2774 | (("ruby_version"
|
| 2775 | . #$(package-version (this-package-input "ruby")))
|
| 2776 | ("vagrant_version"
|
| 2777 | . #$(package-version (this-package-input "vagrant")))
|
| 2778 | ("gem_version" . "")
|
| 2779 | ("require" . "")
|
| 2780 | ("installed_gem_version" . #$version)
|
| 2781 | ("sources" . #()))))
|
| 2782 | port)))))))))))
|
| 2783 | (inputs (list ruby vagrant))
|
| 2784 | (propagated-inputs (list ruby-diffy
|
| 2785 | ruby-fog-core
|
| 2786 | ruby-fog-libvirt
|
| 2787 | ruby-nokogiri
|
| 2788 | ruby-rexml
|
| 2789 | ruby-xml-simple))
|
| 2790 | (synopsis "Libvirt provider for Vagrant")
|
| 2791 | (description "This is a Vagrant plugin that adds a Libvirt provider to
|
| 2792 | Vagrant, allowing Vagrant to control and provision machines via the Libvirt
|
| 2793 | toolkit.")
|
| 2794 | (home-page "https://github.com/vagrant-libvirt/vagrant-libvirt")
|
| 2795 | (license license:expat)))
|
| 2796 |
|
| 2797 | (define-public vagrant-reload
|
| 2798 | (package
|
| 2799 | (name "vagrant-reload")
|
| 2800 | (version "0.0.1")
|
| 2801 | (source (origin
|
| 2802 | (method url-fetch)
|
| 2803 | (uri (rubygems-uri "vagrant-reload" version))
|
| 2804 | (sha256
|
| 2805 | (base32
|
| 2806 | "0smy0px20xgakcyki5hdbk3n63k9c6ychh5pvbannn1p4zjxa0xa"))))
|
| 2807 | (build-system ruby-build-system)
|
| 2808 | (arguments
|
| 2809 | (list
|
| 2810 | #:tests? #f |
| 2811 | |
| 2812 | #:phases
|
| 2813 | #~(modify-phases %standard-phases
|
| 2814 | (add-after 'unpack 'patch-gemfile
|
| 2815 | (lambda _
|
| 2816 | (substitute* "Gemfile"
|
| 2817 | ((", :git.*") "\n"))))
|
| 2818 | (add-after 'install 'install-plugin.json
|
| 2819 | (lambda _
|
| 2820 | (let* ((plugins.d (string-append
|
| 2821 | #$output "/share/vagrant-plugins/plugins.d"))
|
| 2822 | (plugin.json (string-append
|
| 2823 | plugins.d "/" #$name ".json")))
|
| 2824 | (mkdir-p plugins.d)
|
| 2825 | #$(with-extensions (list guile-json-4)
|
| 2826 | #~(begin
|
| 2827 | (use-modules (json))
|
| 2828 | (call-with-output-file plugin.json
|
| 2829 | (lambda (port)
|
| 2830 | (scm->json
|
| 2831 | '((#$name
|
| 2832 | .
|
| 2833 | (("ruby_version"
|
| 2834 | . #$(package-version (this-package-input "ruby")))
|
| 2835 | ("vagrant_version"
|
| 2836 | . #$(package-version (this-package-input "vagrant")))
|
| 2837 | ("gem_version" . "")
|
| 2838 | ("require" . "")
|
| 2839 | ("installed_gem_version" . #$version)
|
| 2840 | ("sources" . #()))))
|
| 2841 | port)))))))))))
|
| 2842 | (inputs (list ruby vagrant))
|
| 2843 | (synopsis "Reload a Vagrant VM as a provisioning step")
|
| 2844 | (description "This Vagrant plugin enables reloading a Vagrant VM as a
|
| 2845 | provisioning step.")
|
| 2846 | (home-page "http://www.vagrantup.com")
|
| 2847 | (license license:expat)))
|
| 2848 |
|
| 2849 | (define-public vagrant-vai
|
| 2850 | (package
|
| 2851 | (name "vagrant-vai")
|
| 2852 | (version "0.9.3")
|
| 2853 | (source (origin
|
| 2854 | (method url-fetch)
|
| 2855 | (uri (rubygems-uri "vai" version))
|
| 2856 | (sha256
|
| 2857 | (base32
|
| 2858 | "041bi8hk03ybhacqzhw153j3knqhwvxn8aczzq6nikmpklcs4m4a"))))
|
| 2859 | (build-system ruby-build-system)
|
| 2860 | (arguments
|
| 2861 | (list
|
| 2862 | #:tests? #f |
| 2863 | #:phases
|
| 2864 | #~(modify-phases %standard-phases
|
| 2865 | (add-after 'install 'install-plugin.json
|
| 2866 | (lambda _
|
| 2867 | (let* ((plugins.d (string-append
|
| 2868 | #$output "/share/vagrant-plugins/plugins.d"))
|
| 2869 | (plugin.json (string-append
|
| 2870 | plugins.d "/" #$name ".json")))
|
| 2871 | (mkdir-p plugins.d)
|
| 2872 | #$(with-extensions (list guile-json-4)
|
| 2873 | #~(begin
|
| 2874 | (use-modules (json))
|
| 2875 | (call-with-output-file plugin.json
|
| 2876 | (lambda (port)
|
| 2877 | (scm->json
|
| 2878 | '(("vai" |
| 2879 | .
|
| 2880 | (("ruby_version"
|
| 2881 | . #$(package-version (this-package-input "ruby")))
|
| 2882 | ("vagrant_version"
|
| 2883 | . #$(package-version (this-package-input "vagrant")))
|
| 2884 | ("gem_version" . "")
|
| 2885 | ("require" . "")
|
| 2886 | ("installed_gem_version" . #$version)
|
| 2887 | ("sources" . #()))))
|
| 2888 | port)))))))))))
|
| 2889 | (inputs (list ruby vagrant))
|
| 2890 | (synopsis "Vagrant provisioning plugin to output an Ansible inventory")
|
| 2891 | (description "This plugin creates an Ansible inventory file containing the
|
| 2892 | created virtual machines and the respective ssh-parameters.")
|
| 2893 | (home-page "https://github.com/MatthewMi11er/vai")
|
| 2894 | (license license:expat)))
|
| 2895 |
|
| 2896 | (define-public python-vagrant
|
| 2897 | (package
|
| 2898 | (name "python-vagrant")
|
| 2899 | (version "1.1.0")
|
| 2900 | (source
|
| 2901 | (origin
|
| 2902 | (method git-fetch)
|
| 2903 | (uri (git-reference
|
| 2904 | (url "https://github.com/todddeluca/python-vagrant")
|
| 2905 | (commit (string-append "v" version))))
|
| 2906 | (file-name (git-file-name name version))
|
| 2907 | (sha256
|
| 2908 | (base32 "032g398vddnaxhkvhdz0x1fxvp8qbgjqiigza1racqq8gp6di6va"))))
|
| 2909 | (build-system pyproject-build-system)
|
| 2910 | (arguments
|
| 2911 | (list #:tests? #f)) |
| 2912 | (native-inputs (list python-setuptools))
|
| 2913 | (home-page "https://github.com/todddeluca/python-vagrant")
|
| 2914 | (synopsis "Python bindings for Vagrant")
|
| 2915 | (description
|
| 2916 | "Python-vagrant is a Python module that provides a thin wrapper around the
|
| 2917 | @code{vagrant} command line executable, allowing programmatic control of Vagrant
|
| 2918 | virtual machines.")
|
| 2919 | (license license:expat)))
|
| 2920 |
|
| 2921 | (define-public bubblewrap
|
| 2922 | (package
|
| 2923 | (name "bubblewrap")
|
| 2924 | (version "0.11.0")
|
| 2925 | (source (origin
|
| 2926 | (method git-fetch)
|
| 2927 | (uri (git-reference
|
| 2928 | (url "https://github.com/containers/bubblewrap/")
|
| 2929 | (commit (string-append "v" version))))
|
| 2930 | (file-name (git-file-name name version))
|
| 2931 | (sha256
|
| 2932 | (base32
|
| 2933 | "1rb7dih12s9liwq2lfjdm1br6jaxkmdwsqjr6zx9wfyy0cnwr07h"))
|
| 2934 | (patches (search-patches "bubblewrap-fix-locale-in-tests.patch"))))
|
| 2935 | (build-system meson-build-system)
|
| 2936 | (arguments
|
| 2937 | (list #:phases
|
| 2938 | #~(modify-phases %standard-phases
|
| 2939 | (add-after 'unpack 'fix-test
|
| 2940 | (lambda* (#:key outputs #:allow-other-keys)
|
| 2941 | |
| 2942 | |
| 2943 | |
| 2944 | |
| 2945 | (let ((tmp-dir (string-append (assoc-ref outputs "out") "/tmp")))
|
| 2946 | (mkdir-p tmp-dir)
|
| 2947 | (substitute* "tests/test-run.sh"
|
| 2948 | (("/var/tmp") tmp-dir)
|
| 2949 | |
| 2950 | (("/usr/bin/env python3") (which "python3"))
|
| 2951 | |
| 2952 | (("/usr/bin/env") (which "env"))
|
| 2953 | |
| 2954 | |
| 2955 | (("/usr") "/gnu")
|
| 2956 | (("--ro-bind /bin /bin") "--ro-bind /gnu /bin")
|
| 2957 | (("--ro-bind /sbin /sbin") "--ro-bind /gnu /sbin")
|
| 2958 | (("--ro-bind /lib /lib") "--ro-bind /gnu /lib")
|
| 2959 | ((" */bin/bash") (which "bash"))
|
| 2960 | (("/bin/sh") (which "sh"))
|
| 2961 | (("findmnt") (which "findmnt")))
|
| 2962 | (substitute* "tests/libtest.sh"
|
| 2963 | (("/var/tmp") tmp-dir)
|
| 2964 | (("/usr") "/gnu")
|
| 2965 | (("--ro-bind /bin /bin") "--ro-bind /gnu /bin")
|
| 2966 | (("--ro-bind /sbin /sbin") "--ro-bind /gnu /sbin")
|
| 2967 | (("--ro-bind /lib /lib") "--ro-bind /gnu /lib")))))
|
| 2968 | |
| 2969 | (add-after 'check 'remove-tmp-dir
|
| 2970 | (lambda* (#:key outputs #:allow-other-keys)
|
| 2971 | (delete-file-recursively (string-append (assoc-ref outputs "out") "/tmp")))))))
|
| 2972 | (inputs (list libcap))
|
| 2973 | (native-inputs (list python-wrapper util-linux pkg-config))
|
| 2974 | (home-page "https://github.com/containers/bubblewrap")
|
| 2975 | (synopsis "Unprivileged sandboxing tool")
|
| 2976 | (description "Bubblewrap is aimed at running applications in a sandbox,
|
| 2977 | restricting their access to parts of the operating system or user data such as
|
| 2978 | the home directory. Bubblewrap always creates a new mount namespace, and the
|
| 2979 | user can specify exactly what parts of the file system should be made visible
|
| 2980 | in the sandbox. These directories are mounted with the @code{nodev} option
|
| 2981 | by default and can be made read-only.")
|
| 2982 | (license license:lgpl2.0+)))
|
| 2983 |
|
| 2984 | (define-public bochs
|
| 2985 | (package
|
| 2986 | (name "bochs")
|
| 2987 | (version "3.0")
|
| 2988 | (source (origin
|
| 2989 | (method url-fetch)
|
| 2990 | (uri (string-append "mirror://sourceforge/bochs/bochs/" version
|
| 2991 | "/bochs-" version ".tar.gz"))
|
| 2992 | (sha256
|
| 2993 | (base32
|
| 2994 | "1al1fx8dbb0ny7a4wbngnz8pqav0nl6rhakb434jqnpka4mm8vyb"))
|
| 2995 | (snippet
|
| 2996 | #~(begin
|
| 2997 | (use-modules (guix build utils))
|
| 2998 | |
| 2999 | (delete-file "bios/i440fx.bin")
|
| 3000 | |
| 3001 | (for-each delete-file
|
| 3002 | (find-files "bios" "^BIOS-bochs-"))))))
|
| 3003 | (build-system gnu-build-system)
|
| 3004 | (arguments
|
| 3005 | (list #:tests? #f |
| 3006 | #:configure-flags
|
| 3007 | |
| 3008 | |
| 3009 | #~(list "--enable-x86-64"
|
| 3010 | "--enable-smp"
|
| 3011 | "--enable-all-optimizations"
|
| 3012 | "--enable-readline"
|
| 3013 | "--enable-avx"
|
| 3014 | "--enable-evex"
|
| 3015 | "--enable-amx"
|
| 3016 | "--enable-vmx=2"
|
| 3017 | "--enable-svm"
|
| 3018 | "--enable-protection-keys"
|
| 3019 | "--enable-cet"
|
| 3020 | "--enable-es1370"
|
| 3021 | "--enable-sb16"
|
| 3022 | "--enable-uintr"
|
| 3023 | "--enable-3dnow"
|
| 3024 | "--enable-usb"
|
| 3025 | "--enable-usb-ohci"
|
| 3026 | "--enable-usb-ehci"
|
| 3027 | "--enable-usb-xhci"
|
| 3028 | "--enable-pnic"
|
| 3029 | "--enable-e1000"
|
| 3030 | "--enable-using-libslirp"
|
| 3031 | "--with-vncsrv")
|
| 3032 | #:phases
|
| 3033 | #~(modify-phases %standard-phases
|
| 3034 | (add-after 'unpack 'make-reproducible
|
| 3035 | (lambda _
|
| 3036 | (substitute* "bios/Makefile.in"
|
| 3037 | (("BUILDDATE.*")
|
| 3038 | "BUILDDATE = `date --utc --date='@0'")))))))
|
| 3039 | (native-inputs (list pkg-config))
|
| 3040 | (inputs (list libslirp libx11 libvnc readline wxwidgets))
|
| 3041 | (home-page "https://bochs.sourceforge.io/")
|
| 3042 | (synopsis "IA-32 (x86) PC emulator")
|
| 3043 | (description "Bochs is a highly portable IA-32 (x86) PC emulator written
|
| 3044 | in C++. It includes emulation of the Intel x86 CPU, common I/O devices, and a
|
| 3045 | custom BIOS. Bochs can be compiled to emulate many different x86 CPUs, from
|
| 3046 | early 386 to the most recent x86-64 Intel and AMD processors. Bochs is
|
| 3047 | capable of running most operating systems inside the emulation including
|
| 3048 | GNU/Linux, DOS or Microsoft Windows.")
|
| 3049 | (license license:lgpl2.1+)))
|
| 3050 |
|
| 3051 | (define-public xen
|
| 3052 | (package
|
| 3053 | (name "xen")
|
| 3054 | (version "4.21.1") |
| 3055 | (source (origin
|
| 3056 | (method git-fetch)
|
| 3057 | (uri (git-reference
|
| 3058 | (url "https://xenbits.xen.org/git-http/xen.git")
|
| 3059 | (commit (string-append "RELEASE-" version))))
|
| 3060 | (file-name (git-file-name name version))
|
| 3061 | (sha256
|
| 3062 | (base32
|
| 3063 | "0y7qqyxx8iwhw2b7yd8y8fwmnyj1wyahbjspd02dfvcmlaifq03d"))))
|
| 3064 | (build-system gnu-build-system)
|
| 3065 | (arguments
|
| 3066 | (list
|
| 3067 | #:configure-flags
|
| 3068 | #~(list "--enable-rpath"
|
| 3069 | "--disable-qemu-traditional" |
| 3070 | "--disable-rombios" |
| 3071 | |
| 3072 | "--disable-stubdom" |
| 3073 | (string-append "--with-initddir=" #$output "/etc/init.d")
|
| 3074 | (string-append "--with-system-qemu="
|
| 3075 | (search-input-file %build-inputs
|
| 3076 | "bin/qemu-system-i386"))
|
| 3077 | (string-append "--with-system-seabios="
|
| 3078 | (search-input-file %build-inputs
|
| 3079 | "share/firmware/bios.bin"))
|
| 3080 | (string-append "--with-system-ovmf="
|
| 3081 | (search-input-file %build-inputs
|
| 3082 | "share/firmware/ovmf_ia32.bin")))
|
| 3083 | #:make-flags
|
| 3084 | #~(list "XEN_BUILD_DATE=Thu Jan 1 01:00:01 CET 1970"
|
| 3085 | "XEN_BUILD_TIME=01:00:01"
|
| 3086 | "XEN_BUILD_HOST="
|
| 3087 | "ETHERBOOT_NICS="
|
| 3088 | "SMBIOS_REL_DATE=01/01/1970"
|
| 3089 | "VGABIOS_REL_DATE=01 Jan 1970"
|
| 3090 | |
| 3091 | |
| 3092 | "SYSCONFIG_DIR=/tmp/etc/default"
|
| 3093 | (string-append "BASH_COMPLETION_DIR=" #$output
|
| 3094 | "/etc/bash_completion.d")
|
| 3095 | (string-append "BOOT_DIR=" #$output "/boot")
|
| 3096 | (string-append "DEBUG_DIR=" #$output "/lib/debug")
|
| 3097 | (string-append "EFI_DIR=" #$output "/lib/efi")
|
| 3098 | (string-append "SHLIB_libxenctrl=-Wl,-rpath=" #$output "/lib")
|
| 3099 | (string-append "SHLIB_libxenguest=-Wl,-rpath=" #$output "/lib")
|
| 3100 | (string-append "SHLIB_libxenstore=-Wl,-rpath=" #$output "/lib")
|
| 3101 | "MINIOS_UPSTREAM_URL=")
|
| 3102 | #:test-target "test"
|
| 3103 | #:phases
|
| 3104 | #~(modify-phases %standard-phases
|
| 3105 | (add-after 'unpack 'unpack-mini-os
|
| 3106 | (lambda* (#:key inputs #:allow-other-keys)
|
| 3107 | (let ((mini-os (dirname (search-input-file inputs "minios.mk"))))
|
| 3108 | (copy-recursively mini-os "extras/mini-os"))))
|
| 3109 | (add-after 'unpack-mini-os 'patch
|
| 3110 | (lambda* (#:key inputs #:allow-other-keys)
|
| 3111 | (substitute* "tools/firmware/Rules.mk"
|
| 3112 | (("override XEN_TARGET_ARCH = x86_32" match)
|
| 3113 | (string-append match "\noverride CC = "
|
| 3114 | (search-input-file inputs
|
| 3115 | "bin/i686-linux-gnu-gcc")))
|
| 3116 | (("^CFLAGS =$" match)
|
| 3117 | (string-append match " -I" (assoc-ref inputs "cross-libc")
|
| 3118 | "/include\n")))
|
| 3119 | (substitute* "config/x86_32.mk"
|
| 3120 | (("(CFLAGS += )-m32 -march=i686" _ match)
|
| 3121 | (string-append match "-march=i686 -I"
|
| 3122 | (assoc-ref inputs "cross-libc") "/include")))
|
| 3123 | |
| 3124 | (substitute* '("tools/Makefile"
|
| 3125 | "tools/xenstored/Makefile"
|
| 3126 | "tools/xenpaging/Makefile")
|
| 3127 | (("\\$\\(INSTALL_DIR\\) .*XEN_(DUMP|LOG|RUN|LIB|PAGING)_DIR.*")
|
| 3128 | "\n")
|
| 3129 | (("\\$\\(INSTALL_DIR\\) .*XEN_(RUN|LIB)_STORED.*") "\n"))
|
| 3130 | |
| 3131 | (substitute* "tools/examples/Makefile"
|
| 3132 | ((" install-(configs|readmes)") ""))
|
| 3133 | |
| 3134 | (substitute* "tools/pygrub/setup.py"
|
| 3135 | (("library_dirs =" match)
|
| 3136 | |
| 3137 | (string-append "runtime_library_dirs = ['" #$output "/lib'],"
|
| 3138 | "\n" match)))))
|
| 3139 | (add-before 'configure 'patch-xen-script-directory
|
| 3140 | (lambda _
|
| 3141 | (substitute* '("configure"
|
| 3142 | "tools/configure"
|
| 3143 | "docs/configure")
|
| 3144 | (("(XEN_SCRIPT_DIR=).*" _ match)
|
| 3145 | (string-append match #$output "/etc/xen/scripts")))))
|
| 3146 | (add-before 'configure 'set-environment-up
|
| 3147 | (lambda* (#:key make-flags #:allow-other-keys)
|
| 3148 | (define (cross? x)
|
| 3149 | (string-contains x "cross-i686-linux"))
|
| 3150 | (define (filter-environment! filter-predicate
|
| 3151 | environment-variable-names)
|
| 3152 | (for-each
|
| 3153 | (lambda (env-name)
|
| 3154 | (let* ((env-value (getenv env-name))
|
| 3155 | (search-path (search-path-as-string->list env-value))
|
| 3156 | (new-search-path (filter filter-predicate
|
| 3157 | search-path))
|
| 3158 | (new-env-value (list->search-path-as-string
|
| 3159 | new-search-path ":")))
|
| 3160 | (setenv env-name new-env-value)))
|
| 3161 | environment-variable-names))
|
| 3162 | (setenv "CROSS_C_INCLUDE_PATH" (getenv "C_INCLUDE_PATH"))
|
| 3163 | (setenv "CROSS_CPLUS_INCLUDE_PATH" (getenv "CPLUS_INCLUDE_PATH"))
|
| 3164 | (setenv "CROSS_LIBRARY_PATH" (getenv "LIBRARY_PATH"))
|
| 3165 | (filter-environment! cross?
|
| 3166 | '("CROSS_C_INCLUDE_PATH"
|
| 3167 | "CROSS_CPLUS_INCLUDE_PATH"
|
| 3168 | "CROSS_LIBRARY_PATH"))
|
| 3169 | (filter-environment! (lambda (e) (not (cross? e)))
|
| 3170 | '("C_INCLUDE_PATH" "CPLUS_INCLUDE_PATH"
|
| 3171 | "LIBRARY_PATH"))
|
| 3172 | |
| 3173 | |
| 3174 | |
| 3175 | (filter-environment! (lambda (e)
|
| 3176 | (not
|
| 3177 | (string-contains e
|
| 3178 | "mini-os-git-checkout")))
|
| 3179 | '("C_INCLUDE_PATH" "CPLUS_INCLUDE_PATH"
|
| 3180 | "LIBRARY_PATH"))
|
| 3181 | (setenv "EFI_VENDOR" "guix")))
|
| 3182 | (replace 'build
|
| 3183 | (lambda* (#:key make-flags parallel-build? #:allow-other-keys)
|
| 3184 | (apply invoke "make" "world"
|
| 3185 | "-j" (number->string
|
| 3186 | (if parallel-build? (parallel-job-count) 1))
|
| 3187 | make-flags)))
|
| 3188 | (add-after 'install 'remove-cruft
|
| 3189 | (lambda _
|
| 3190 | (with-directory-excursion #$output
|
| 3191 | |
| 3192 | (for-each delete-file
|
| 3193 | (find-files "share/doc" "^\\.deps$"))))))))
|
| 3194 | (inputs
|
| 3195 | (list acpica |
| 3196 | bridge-utils |
| 3197 | glib
|
| 3198 | iproute |
| 3199 | libaio
|
| 3200 | libx11
|
| 3201 | libxcrypt |
| 3202 | yajl
|
| 3203 | ncurses
|
| 3204 | openssl
|
| 3205 | ovmf-i686
|
| 3206 | pixman
|
| 3207 | qemu-minimal
|
| 3208 | seabios
|
| 3209 | `(,util-linux "lib") |
| 3210 | |
| 3211 | xz |
| 3212 | zlib))
|
| 3213 | (native-inputs
|
| 3214 | (list dev86
|
| 3215 | bison
|
| 3216 | cmake-minimal
|
| 3217 | figlet
|
| 3218 | flex
|
| 3219 | gettext-minimal
|
| 3220 | libnl
|
| 3221 | (origin
|
| 3222 | (method git-fetch)
|
| 3223 | (uri (git-reference
|
| 3224 | (url "https://xenbits.xen.org/git-http/mini-os.git")
|
| 3225 | |
| 3226 | |
| 3227 | |
| 3228 | |
| 3229 | (commit "6732fd42d8eb8d0af9f5eb54aca17f4c250213a8")))
|
| 3230 | (sha256
|
| 3231 | (base32 "1v4hhdp0zq93mvwi6w6jmmsmkff439hb41w5qmp5k3g5wr1b786w"))
|
| 3232 | (file-name (string-append name "-" version "-mini-os-git-checkout")))
|
| 3233 | perl
|
| 3234 | |
| 3235 | pkg-config
|
| 3236 | python
|
| 3237 | python-setuptools
|
| 3238 | wget
|
| 3239 | (cross-gcc "i686-linux-gnu"
|
| 3240 | #:xbinutils (cross-binutils "i686-linux-gnu")
|
| 3241 | #:libc (cross-libc "i686-linux-gnu"))
|
| 3242 | (cross-libc "i686-linux-gnu") |
| 3243 | `(,(cross-libc "i686-linux-gnu") "static")))
|
| 3244 | (home-page "https://xenproject.org/")
|
| 3245 | (synopsis "Hypervisor")
|
| 3246 | (description "This package provides the Xen Virtual Machine Monitor
|
| 3247 | which is a hypervisor.")
|
| 3248 | |
| 3249 | (license license:gpl2)
|
| 3250 | (supported-systems '("i686-linux" "x86_64-linux" "armhf-linux"))))
|
| 3251 |
|
| 3252 | (define-public xen-guest-agent
|
| 3253 | (package
|
| 3254 | (name "xen-guest-agent")
|
| 3255 | (version "0.4.0")
|
| 3256 | (source (origin
|
| 3257 | (method git-fetch)
|
| 3258 | (uri (git-reference
|
| 3259 | (url "https://gitlab.com/xen-project/xen-guest-agent")
|
| 3260 | (commit version)))
|
| 3261 | (file-name (git-file-name name version))
|
| 3262 | (sha256
|
| 3263 | (base32 "1ab6mgrvnd49m0ay9fbfyd02xaf3qvkwhyyavra4a7wpz0brg54h"))))
|
| 3264 | (build-system cargo-build-system)
|
| 3265 | (arguments
|
| 3266 | (list #:install-source? #f))
|
| 3267 | (native-inputs
|
| 3268 | (list pkg-config
|
| 3269 | xen |
| 3270 | clang-13))
|
| 3271 | (inputs (cargo-inputs 'xen-guest-agent))
|
| 3272 | (home-page "https://gitlab.com/xen-project/xen-guest-agent")
|
| 3273 | (synopsis "Provides guest VM information to hosting Xen hypervisor")
|
| 3274 | (description "The agent gathers some guest information, and writes them to
|
| 3275 | xenstore so tooling in dom0 can read it. The default behavior is to be
|
| 3276 | compatible with the XAPI toolstack as currently used in XCP-ng and Citrix
|
| 3277 | Hypervisor/Xenserver, and thus roughly follow what @code{xe-guest-utilities}
|
| 3278 | is doing.")
|
| 3279 | (license license:agpl3)))
|
| 3280 |
|
| 3281 | (define-public xe-guest-utilities
|
| 3282 | (package
|
| 3283 | (name "xe-guest-utilities")
|
| 3284 | (version "8.4.0")
|
| 3285 | (source (origin
|
| 3286 | (method git-fetch)
|
| 3287 | (uri (git-reference
|
| 3288 | (url "https://github.com/xenserver/xe-guest-utilities")
|
| 3289 | (commit (string-append "v" version))))
|
| 3290 | (file-name (git-file-name name version))
|
| 3291 | (sha256
|
| 3292 | (base32
|
| 3293 | "1yqspizhq3ii6cz2w75slaxy8838yyri9pmgc2q1radnm7w735if"))))
|
| 3294 | (build-system go-build-system)
|
| 3295 | (arguments
|
| 3296 | (list
|
| 3297 | #:import-path "github.com/xenserver/xe-guest-utilities"
|
| 3298 | #:install-source? #f
|
| 3299 | #:tests? #f |
| 3300 | #:phases
|
| 3301 | #~(modify-phases %standard-phases
|
| 3302 | |
| 3303 | |
| 3304 | |
| 3305 | |
| 3306 | (add-after 'patch-source-shebangs 'fix-udev-rule
|
| 3307 | (lambda* (#:key inputs import-path #:allow-other-keys)
|
| 3308 | (substitute* (string-append "src/" import-path "/mk/xen-vcpu-hotplug.rules")
|
| 3309 | (("/bin/sh") (search-input-file inputs "/bin/sh")))))
|
| 3310 | (replace 'build
|
| 3311 | (lambda* (#:key import-path #:allow-other-keys)
|
| 3312 | (with-directory-excursion (string-append "src/" import-path)
|
| 3313 | |
| 3314 | |
| 3315 | |
| 3316 | (invoke "make" (string-append "RELEASE=" #$version) "build"))))
|
| 3317 | |
| 3318 | |
| 3319 | |
| 3320 | (replace 'install
|
| 3321 | (lambda* (#:key outputs import-path #:allow-other-keys)
|
| 3322 | (let* ((stage (string-append "src/" import-path "/build/stage"))
|
| 3323 | (out (assoc-ref outputs "out")))
|
| 3324 | |
| 3325 | (copy-recursively (string-append stage "/etc/udev")
|
| 3326 | (string-append out "/lib/udev"))
|
| 3327 | |
| 3328 | (copy-recursively (string-append stage "/usr") out)))))))
|
| 3329 | (native-inputs (list go-golang-org-x-sys))
|
| 3330 | (inputs (list bash-minimal))
|
| 3331 | (home-page "https://github.com/xenserver/xe-guest-utilities")
|
| 3332 | (synopsis "XenServer guest utilities for unix-like operating systems")
|
| 3333 | (description "The XenServer guest utilities enable a Xen-based hypervisor,
|
| 3334 | (Citrix XenServer, XCP-NG, etc.) to work with a Xen-enabled Unix-like guest VMs.
|
| 3335 | This allows the guest to share information about its state back to the host,
|
| 3336 | such IP address, memory usage, etc. and allows the host to inform the guest VM
|
| 3337 | about events that change the virtualized hardware, such as hotplugging.")
|
| 3338 | (license license:bsd-2)))
|
| 3339 |
|
| 3340 | (define-public osinfo-db-tools
|
| 3341 | (package
|
| 3342 | (name "osinfo-db-tools")
|
| 3343 | (version "1.12.0")
|
| 3344 | (source (origin
|
| 3345 | (method url-fetch)
|
| 3346 | (uri (string-append "https://releases.pagure.org/libosinfo/osinfo-db-tools-"
|
| 3347 | version ".tar.xz"))
|
| 3348 |
|
| 3349 | (sha256
|
| 3350 | (base32
|
| 3351 | "1wz7fqvrqpw1bvp3f37n03xhxj4g1fr09vd8vqjhyxqqbmkmycgk"))))
|
| 3352 | (build-system meson-build-system)
|
| 3353 | (inputs
|
| 3354 | (list libsoup-minimal-2 libxml2 libxslt json-glib libarchive))
|
| 3355 | (native-inputs
|
| 3356 | (list perl
|
| 3357 | gobject-introspection
|
| 3358 | gettext-minimal
|
| 3359 | pkg-config
|
| 3360 | |
| 3361 | python
|
| 3362 | python-pytest
|
| 3363 | python-requests))
|
| 3364 | (home-page "https://gitlab.com/libosinfo/osinfo-db-tools")
|
| 3365 | (synopsis "Tools for managing the osinfo database")
|
| 3366 | (description "This package contains a set of tools to assist
|
| 3367 | administrators and developers in managing the database.")
|
| 3368 | (license license:lgpl2.0+)))
|
| 3369 |
|
| 3370 | (define-public osinfo-db
|
| 3371 | (package
|
| 3372 | (name "osinfo-db")
|
| 3373 | (version "20250124")
|
| 3374 | (source
|
| 3375 | (origin
|
| 3376 | (method url-fetch)
|
| 3377 | (uri (string-append "https://releases.pagure.org/libosinfo/osinfo-db-"
|
| 3378 | version ".tar.xz"))
|
| 3379 | (sha256
|
| 3380 | (base32 "0l3j4lxgixqys1zmqs195rlb181n2kfyz7mkl8sq2yasjzq1g9vw"))))
|
| 3381 | (build-system trivial-build-system)
|
| 3382 | (arguments
|
| 3383 | (list
|
| 3384 | #:modules '((guix build utils))
|
| 3385 | #:builder
|
| 3386 | #~(begin
|
| 3387 | (use-modules (guix build utils))
|
| 3388 | (let ((osinfo (string-append #$output "/share/osinfo"))
|
| 3389 | (source (assoc-ref %build-inputs "source"))
|
| 3390 | (import-osinfo-db
|
| 3391 | (string-append #$(this-package-native-input "osinfo-db-tools")
|
| 3392 | "/bin/osinfo-db-import")))
|
| 3393 | (mkdir-p osinfo)
|
| 3394 | (invoke import-osinfo-db "--dir" osinfo source)))))
|
| 3395 | (native-inputs
|
| 3396 | (list intltool osinfo-db-tools))
|
| 3397 | (home-page "https://gitlab.com/libosinfo/osinfo-db")
|
| 3398 | (synopsis "Database of information about operating systems")
|
| 3399 | (description "Osinfo-db provides the database files for use with the
|
| 3400 | libosinfo library. It provides information about guest operating systems for
|
| 3401 | use with virtualization provisioning tools")
|
| 3402 | (license license:lgpl2.0+)))
|
| 3403 |
|
| 3404 | (define-public python-transient
|
| 3405 | (package
|
| 3406 | (name "python-transient")
|
| 3407 | (version "0.25")
|
| 3408 | (source
|
| 3409 | (origin
|
| 3410 | (method git-fetch)
|
| 3411 | (uri (git-reference
|
| 3412 | (url "https://github.com/ALSchwalm/transient")
|
| 3413 | (commit (string-append "v" version))))
|
| 3414 | (file-name (git-file-name name version))
|
| 3415 | (sha256
|
| 3416 | (base32 "1c2v0z1amgfx747sqn8airq71bnp58syvsaqlazirahyn2yjg04d"))))
|
| 3417 | (build-system pyproject-build-system)
|
| 3418 | (arguments
|
| 3419 | (list #:phases
|
| 3420 | #~(modify-phases %standard-phases
|
| 3421 | (add-after 'unpack 'fix-marshmallow-and-dependencies
|
| 3422 | (lambda _
|
| 3423 | |
| 3424 | |
| 3425 | (substitute* "transient/configuration.py"
|
| 3426 | (("missing") "load_default"))
|
| 3427 | (substitute* "setup.py"
|
| 3428 | (("(~|=)=") ">=")
|
| 3429 | (("lark-parser>=[0-9.]*") "lark")))))))
|
| 3430 | (native-inputs
|
| 3431 | (list python-pyhamcrest
|
| 3432 | python-pytest
|
| 3433 | python-setuptools
|
| 3434 | python-wheel))
|
| 3435 | (propagated-inputs
|
| 3436 | (list python-beautifultable
|
| 3437 | python-click
|
| 3438 | python-importlib-resources
|
| 3439 | python-lark
|
| 3440 | python-marshmallow
|
| 3441 | python-progressbar2
|
| 3442 | python-requests
|
| 3443 | python-toml))
|
| 3444 | (home-page "https://github.com/ALSchwalm/transient")
|
| 3445 | (synopsis "QEMU Wrapper written in Python")
|
| 3446 | (description
|
| 3447 | "@code{transient} is a wrapper for QEMU allowing the creation of virtual
|
| 3448 | machines with shared folder, ssh, and disk creation support.")
|
| 3449 | (license license:expat)))
|
| 3450 |
|
| 3451 | (define-public riscv-pk
|
| 3452 | |
| 3453 | (let ((commit "9c61d29846d8521d9487a57739330f9682d5b542")
|
| 3454 | (revision "0"))
|
| 3455 | (package
|
| 3456 | (name "riscv-pk")
|
| 3457 | (version (git-version "1.1.0" revision commit))
|
| 3458 | (source
|
| 3459 | (origin
|
| 3460 | (method git-fetch)
|
| 3461 | (uri (git-reference
|
| 3462 | (url "https://github.com/riscv-software-src/riscv-pk")
|
| 3463 | (commit commit)))
|
| 3464 | (file-name (git-file-name name version))
|
| 3465 | (sha256
|
| 3466 | (base32
|
| 3467 | "0k5ahxydxiaw2plcn3br70r8rskm0i3815jdrcywv6r8lb8xm2wd"))))
|
| 3468 | (build-system gnu-build-system)
|
| 3469 | (arguments
|
| 3470 | (list #:out-of-source? #t
|
| 3471 | |
| 3472 | #:target "riscv64-linux-gnu"
|
| 3473 | #:make-flags #~(list (string-append "INSTALLDIR=" #$output))
|
| 3474 | |
| 3475 | |
| 3476 | #:strip-flags #~(list "--strip-unneeded"
|
| 3477 | "--keep-symbol=fromhost"
|
| 3478 | "--keep-symbol=tohost"
|
| 3479 | "--enable-deterministic-archives")))
|
| 3480 | (home-page "https://github.com/riscv-software-src/riscv-pk")
|
| 3481 | (synopsis "RISC-V Proxy Kernel")
|
| 3482 | (description "The RISC-V Proxy Kernel, @command{pk}, is a lightweight
|
| 3483 | application execution environment that can host statically-linked RISC-V ELF
|
| 3484 | binaries. It is designed to support tethered RISC-V implementations with
|
| 3485 | limited I/O capability and thus handles I/O-related system calls by proxying
|
| 3486 | them to a host computer.
|
| 3487 |
|
| 3488 | This package also contains the Berkeley Boot Loader, @command{bbl}, which is a
|
| 3489 | supervisor execution environment for tethered RISC-V systems. It is designed
|
| 3490 | to host the RISC-V Linux port.")
|
| 3491 | (license license:bsd-3))))
|
| 3492 |
|
| 3493 | (define-public hivex
|
| 3494 | (package
|
| 3495 | (name "hivex")
|
| 3496 | (version "1.3.24")
|
| 3497 | (source (origin
|
| 3498 | (method url-fetch)
|
| 3499 | (uri (string-append "https://libguestfs.org/download/"
|
| 3500 | name "/" name "-" version ".tar.gz"))
|
| 3501 | (sha256
|
| 3502 | (base32
|
| 3503 | "0g0rib62qg81fda8lxsaa7a1ykqy4rl5sq185pdqm9y9xifa8bx5"))))
|
| 3504 | (build-system gnu-build-system)
|
| 3505 | (native-inputs (list automake-1.16.5
|
| 3506 | autoconf
|
| 3507 | gettext-minimal
|
| 3508 | libtool
|
| 3509 | ocaml
|
| 3510 | pkg-config
|
| 3511 | perl-io-stringy
|
| 3512 | python-wrapper
|
| 3513 | ruby
|
| 3514 | ruby-rake
|
| 3515 | ruby-rdoc))
|
| 3516 | (inputs
|
| 3517 | (list bash-minimal
|
| 3518 | libxml2
|
| 3519 | perl
|
| 3520 | readline))
|
| 3521 | (arguments
|
| 3522 | (list
|
| 3523 | #:configure-flags
|
| 3524 | #~(list "--disable-static" "--with-readline" "--disable-rpath"
|
| 3525 | (string-append "LDFLAGS=-Wl,-rpath=" #$output "/lib"))
|
| 3526 | #:phases
|
| 3527 | #~(modify-phases %standard-phases
|
| 3528 | (add-after 'unpack 'patch-makefiles
|
| 3529 | (lambda _
|
| 3530 | (let* ((current-system (or #$(%current-target-system)
|
| 3531 | #$(%current-system)))
|
| 3532 | (ocamllib
|
| 3533 | (string-append #$output "/lib/ocaml/"
|
| 3534 | #$(package-version
|
| 3535 | (this-package-native-input "ocaml")) "/site-lib"))
|
| 3536 | (python-installdir
|
| 3537 | (string-append #$output "/lib/python"
|
| 3538 | #$(version-major+minor
|
| 3539 | (package-version
|
| 3540 | (this-package-native-input
|
| 3541 | "python-wrapper")))
|
| 3542 | "/site-packages"))
|
| 3543 | (ruby-version
|
| 3544 | #$(package-version
|
| 3545 | (this-package-native-input "ruby")))
|
| 3546 | (ruby-libdir
|
| 3547 | (string-append #$output
|
| 3548 | "/lib/ruby/site_ruby/"
|
| 3549 | ruby-version))
|
| 3550 | (ruby-archdir
|
| 3551 | (string-append ruby-libdir "/" current-system)))
|
| 3552 | (substitute* "lib/Makefile.am"
|
| 3553 | (((string-append "\\$\\(VERSION_SCRIPT_FLAGS\\)"
|
| 3554 | "\\$\\(srcdir\\)/hivex\\.syms"))
|
| 3555 | ""))
|
| 3556 | (substitute* "python/Makefile.am"
|
| 3557 | (("\\$\\(PYTHON_INSTALLDIR\\)")
|
| 3558 | python-installdir))
|
| 3559 | (substitute* "ocaml/Makefile.am"
|
| 3560 | (("\\$\\(DESTDIR\\)\\$\\(OCAMLLIB\\)")
|
| 3561 | ocamllib))
|
| 3562 | (substitute* "ruby/Makefile.am"
|
| 3563 | (("\\$\\(DESTDIR\\)\\$\\(RUBY_ARCHDIR\\)")
|
| 3564 | ruby-archdir)
|
| 3565 | (("\\$\\(DESTDIR\\)\\$\\(RUBY_LIBDIR\\)")
|
| 3566 | ruby-libdir))
|
| 3567 | |
| 3568 | (substitute* "perl/Makefile.PL.in"
|
| 3569 | (("CCFLAGS => \\$Config\\{ccflags\\} \\. ' @CFLAGS@',")
|
| 3570 | (string-append "CCFLAGS => $Config{ccflags} . ' @CFLAGS@',
|
| 3571 | LDDLFLAGS => $Config{lddlflags} . ' -Wl,-rpath," #$output "/lib',")))
|
| 3572 | (substitute* "ruby/ext/hivex/extconf.rb"
|
| 3573 | (("create_header")
|
| 3574 | (string-append "
|
| 3575 | $LDFLAGS += \" -Wl,-rpath=" #$output "/lib \"
|
| 3576 | create_header"))))))
|
| 3577 | (add-after 'install 'wrap-binaries
|
| 3578 | (lambda _
|
| 3579 | (let ((hivexregedit
|
| 3580 | (string-append #$output "/bin/hivexregedit"))
|
| 3581 | (hivexml
|
| 3582 | (string-append #$output "/bin/hivexml")))
|
| 3583 | (wrap-program hivexregedit
|
| 3584 | `("PERL5LIB" ":" prefix
|
| 3585 | (,(string-append #$output "/lib/perl5/site_perl")))
|
| 3586 | `("PATH" ":" prefix
|
| 3587 | (,(string-append #$output "/bin"))))
|
| 3588 | (wrap-program hivexml
|
| 3589 | `("PATH" ":" prefix
|
| 3590 | (,(string-append #$output "/bin"))))))))))
|
| 3591 | (home-page "https://github.com/libguestfs/hivex")
|
| 3592 | (synopsis "Windows registry hive extraction library")
|
| 3593 | (description
|
| 3594 | "This package provides a self-contained library for reading and writing
|
| 3595 | Windows Registry \"hive\" binary files. Unlike many other tools in this area,
|
| 3596 | it doesn't use the textual @code{.REG} format for output, because parsing that
|
| 3597 | is as much trouble as parsing the original binary format. Instead it makes the
|
| 3598 | file available through a C API, or through a separate program to export the
|
| 3599 | hive as XML.")
|
| 3600 | (license license:lgpl2.1)))
|
| 3601 |
|
| 3602 | (define-public libguestfs-minimal
|
| 3603 | (package
|
| 3604 | (name "libguestfs-minimal")
|
| 3605 | (version "1.56.2")
|
| 3606 | (source (origin
|
| 3607 | (method url-fetch)
|
| 3608 | (uri (string-append "https://download.libguestfs.org/"
|
| 3609 | (version-major+minor version)
|
| 3610 | "-stable/libguestfs-" version ".tar.gz"))
|
| 3611 | (sha256
|
| 3612 | (base32
|
| 3613 | "16k8064zgmrh2xclax3j3yr69pd6jla4jb7f7hhpj2syg4d8ji5v"))
|
| 3614 | (patches
|
| 3615 | (search-patches "libguestfs-syms.patch"))))
|
| 3616 | (build-system gnu-build-system)
|
| 3617 | (arguments
|
| 3618 | (list #:configure-flags
|
| 3619 | #~(list "--disable-appliance"
|
| 3620 | "--disable-daemon"
|
| 3621 | "--disable-static"
|
| 3622 | "--disable-erlang"
|
| 3623 | "--disable-golang"
|
| 3624 | "--disable-haskell"
|
| 3625 | "--disable-java"
|
| 3626 | "--disable-lua"
|
| 3627 | |
| 3628 | |
| 3629 | |
| 3630 | "--disable-perl"
|
| 3631 | "--disable-php"
|
| 3632 | "--with-distro=\"Guix System\""
|
| 3633 | "--with-readline"
|
| 3634 | (string-append "LDFLAGS=-Wl,-rpath," %output "/lib"))
|
| 3635 | #:make-flags #~'("REALLY_INSTALL=yes")
|
| 3636 | #:phases
|
| 3637 | #~(let* ((lib (string-append #$output "/lib"))
|
| 3638 | (lib/ocaml (string-append lib "/ocaml")))
|
| 3639 | (modify-phases %standard-phases
|
| 3640 | (add-after 'unpack 'patch-makefiles
|
| 3641 | (lambda _
|
| 3642 | (for-each patch-shebang
|
| 3643 | (find-files "."))
|
| 3644 | (substitute* "ocaml/Makefile.am"
|
| 3645 | (("\\$\\(DESTDIR\\)\\$\\(INSTALL_OCAMLLIB\\)")
|
| 3646 | lib/ocaml))
|
| 3647 | |
| 3648 | |
| 3649 | (substitute* "perl/Build.PL.in"
|
| 3650 | (("extra_linker_flags => \\[")
|
| 3651 | (string-append "extra_linker_flags => [
|
| 3652 | '-L" lib "',")))))
|
| 3653 | (replace 'bootstrap
|
| 3654 | (lambda _
|
| 3655 | (invoke "autoreconf" "-vif")))
|
| 3656 | (replace 'check
|
| 3657 | (lambda* (#:key tests? make-flags #:allow-other-keys)
|
| 3658 | (when tests?
|
| 3659 | (apply invoke `("make" ,@make-flags "check-direct")))))
|
| 3660 | (replace 'install
|
| 3661 | (lambda* (#:key make-flags #:allow-other-keys)
|
| 3662 | (mkdir-p "temp-build-dir")
|
| 3663 | (apply invoke `("make" ,@make-flags "INSTALLDIRS=vendor"
|
| 3664 | "install"))))
|
| 3665 | (add-after 'install 'wrap-binaries
|
| 3666 | (lambda _
|
| 3667 | (let ((bin (string-append #$output "/bin")))
|
| 3668 | (for-each
|
| 3669 | (lambda (binary)
|
| 3670 | (use-modules (srfi srfi-1))
|
| 3671 | (wrap-program binary
|
| 3672 | `("PERL5LIB" ":" prefix
|
| 3673 | (,(string-append #$output
|
| 3674 | "/lib/perl5/site_perl")))
|
| 3675 | `("PATH" ":" prefix
|
| 3676 | ,(search-path-as-list
|
| 3677 | '("bin")
|
| 3678 | (map second
|
| 3679 | '#$(package-inputs this-package))))))
|
| 3680 | (find-files bin)))))
|
| 3681 | (replace 'validate-documentation-location
|
| 3682 | (lambda _
|
| 3683 | (let ((man-dir
|
| 3684 | (string-append #$output "/man"))
|
| 3685 | (info-dir
|
| 3686 | (string-append #$output "/info")))
|
| 3687 | (for-each (lambda (d)
|
| 3688 | (invoke "rm" "-rf" d))
|
| 3689 | (list man-dir info-dir)))))))))
|
| 3690 | (native-inputs (list augeas
|
| 3691 | autoconf
|
| 3692 | automake
|
| 3693 | bison
|
| 3694 | cpio
|
| 3695 | flex
|
| 3696 | gettext-minimal
|
| 3697 | gperf
|
| 3698 | libtool
|
| 3699 | ocaml
|
| 3700 | ocaml-findlib
|
| 3701 | ncurses
|
| 3702 | perl
|
| 3703 | perl-getopt-long
|
| 3704 | perl-module-build
|
| 3705 | pkg-config
|
| 3706 | po4a
|
| 3707 | xorriso
|
| 3708 | xz
|
| 3709 | zstd
|
| 3710 | (list zstd "lib")))
|
| 3711 | (inputs
|
| 3712 | (list file
|
| 3713 | fuse
|
| 3714 | json-c
|
| 3715 | hivex
|
| 3716 | libtirpc
|
| 3717 | pcre2
|
| 3718 | readline
|
| 3719 | qemu))
|
| 3720 | (home-page "https://libguestfs.org/")
|
| 3721 | (synopsis "Access and modify virtual machine disk images")
|
| 3722 | (description
|
| 3723 | "@code{libguestfs} is a set of tools for accessing and modifying virtual
|
| 3724 | machine (VM) disk images. You can use this for viewing and editing files inside
|
| 3725 | guests, scripting changes to VMs, monitoring disk used/free statistics, creating
|
| 3726 | guests, P2V, V2V, performing backups, cloning VMs, building VMs, formatting
|
| 3727 | disks, resizing disks, and much more.")
|
| 3728 | (license (list license:gpl2+ license:lgpl2.1+))))
|
| 3729 |
|
| 3730 | (define-public libguestfs
|
| 3731 | (package/inherit libguestfs-minimal
|
| 3732 | (name "libguestfs")
|
| 3733 | (arguments
|
| 3734 | (substitute-keyword-arguments arguments
|
| 3735 | ((#:configure-flags flags)
|
| 3736 | #~(append
|
| 3737 | (filter
|
| 3738 | (lambda (flag)
|
| 3739 | (not (string-prefix? "LDFLAGS" flag)))
|
| 3740 | #$flags)
|
| 3741 | (list
|
| 3742 | "--enable-vala=yes"
|
| 3743 | (string-append "--with-python-installdir="
|
| 3744 | #$output "/lib/python"
|
| 3745 | #$(version-major+minor
|
| 3746 | (package-version python))
|
| 3747 | "/site-packages")
|
| 3748 | (string-append "LDFLAGS=-Wl,-rpath," %output "/lib"))))
|
| 3749 | ((#:phases phases)
|
| 3750 | #~(modify-phases #$phases
|
| 3751 | (add-after 'patch-makefiles 'patch-additional-makefiles
|
| 3752 | (lambda _
|
| 3753 | (let* ((current-system (or #$(%current-target-system)
|
| 3754 | #$(%current-system)))
|
| 3755 | (lib (string-append #$output "/lib"))
|
| 3756 | (share (string-append #$output "/share"))
|
| 3757 | (completions
|
| 3758 | (string-append share "/bash-completion/completions"))
|
| 3759 | (lib/lua (string-append lib "/lua"))
|
| 3760 | (lib/ocaml (string-append lib "/ocaml"))
|
| 3761 | (ruby-version
|
| 3762 | #$(package-version
|
| 3763 | (this-package-native-input "ruby")))
|
| 3764 | (ruby-libdir
|
| 3765 | (string-append lib
|
| 3766 | "/ruby/site_ruby/"
|
| 3767 | ruby-version))
|
| 3768 | (ruby-archdir
|
| 3769 | (string-append ruby-libdir "/" current-system)))
|
| 3770 | (substitute* "m4/guestfs-bash-completion.m4"
|
| 3771 | (("`pkg-config --variable=completionsdir bash-completion`")
|
| 3772 | completions))
|
| 3773 | (substitute* "lua/Makefile.am"
|
| 3774 | (("\\$\\(DESTDIR\\)\\$\\(lualibdir\\)")
|
| 3775 | lib/lua))
|
| 3776 | (substitute* "ruby/Makefile.am"
|
| 3777 | (("\\$\\(DESTDIR\\)\\$\\(RUBY_ARCHDIR\\)")
|
| 3778 | ruby-archdir)
|
| 3779 | (("\\$\\(DESTDIR\\)\\$\\(RUBY_LIBDIR\\)")
|
| 3780 | ruby-libdir))
|
| 3781 | |
| 3782 | (substitute* "ruby/ext/guestfs/extconf.rb.in"
|
| 3783 | (("create_header")
|
| 3784 | (string-append "
|
| 3785 | $LDFLAGS += \" -Wl,-rpath=" #$output "/lib \"
|
| 3786 | create_header"))))))))))
|
| 3787 | (native-inputs
|
| 3788 | (modify-inputs native-inputs
|
| 3789 | (prepend bash-completion
|
| 3790 | gobject-introspection
|
| 3791 | python
|
| 3792 | ruby
|
| 3793 | util-linux
|
| 3794 | vala
|
| 3795 | xorriso)))
|
| 3796 | (inputs
|
| 3797 | (modify-inputs inputs
|
| 3798 | (prepend acl
|
| 3799 | bdb
|
| 3800 | fuse
|
| 3801 | gmp
|
| 3802 | libapparmor
|
| 3803 | libcap
|
| 3804 | libcap-ng
|
| 3805 | libconfig
|
| 3806 | libvirt
|
| 3807 | libxcrypt
|
| 3808 | numactl
|
| 3809 | yajl)))))
|
| 3810 |
|
| 3811 | (define-public libtpms
|
| 3812 | (package
|
| 3813 | (name "libtpms")
|
| 3814 | (version "0.10.2")
|
| 3815 | (source
|
| 3816 | (origin
|
| 3817 | (method git-fetch)
|
| 3818 | (uri (git-reference
|
| 3819 | (url "https://github.com/stefanberger/libtpms")
|
| 3820 | (commit (string-append "v" version))))
|
| 3821 | (file-name (git-file-name name version))
|
| 3822 | (sha256
|
| 3823 | (base32 "190qnjp384a8i8jqh3xyxac7i3cbsbphbl6wk91kw5gzjymjj4aj"))
|
| 3824 | (patches (search-patches "libtpms-pkgconfigdir.patch"))
|
| 3825 | (snippet
|
| 3826 | '(begin
|
| 3827 | (delete-file "autogen.sh")
|
| 3828 | (delete-file "bootstrap.sh")))))
|
| 3829 | (build-system gnu-build-system)
|
| 3830 | (home-page "https://github.com/stefanberger/libtpms")
|
| 3831 | (arguments
|
| 3832 | (list
|
| 3833 | #:phases
|
| 3834 | #~(modify-phases %standard-phases
|
| 3835 | (add-after 'unpack 'drop-empty-pkg-installdir
|
| 3836 | (lambda _
|
| 3837 | (substitute* "configure.ac"
|
| 3838 | |
| 3839 | (("^PKG_INSTALLDIR\\(\\)") "")))))))
|
| 3840 | (inputs (list openssl))
|
| 3841 | (native-inputs (list autoconf-wrapper automake libtool
|
| 3842 | |
| 3843 | perl))
|
| 3844 | (synopsis "TPM emulation library")
|
| 3845 | (description "The libtpms library provides software emulation of a
|
| 3846 | Trusted Platform Module (TPM 1.2 and TPM 2.0).")
|
| 3847 | (license license:bsd-3)))
|
| 3848 |
|
| 3849 | (define-public virt-what
|
| 3850 | (package
|
| 3851 | (name "virt-what")
|
| 3852 | (version "1.27")
|
| 3853 | (source (origin
|
| 3854 | (method url-fetch)
|
| 3855 | (uri (string-append "https://people.redhat.com/~rjones/virt-what/"
|
| 3856 | "files/" name "-" version ".tar.gz"))
|
| 3857 | (sha256
|
| 3858 | (base32
|
| 3859 | "1wcvqs5g6b86bym75f1h8gmwf5ak95iwdyj3ficrb4759afvvnfl"))))
|
| 3860 | (build-system gnu-build-system)
|
| 3861 | (arguments
|
| 3862 | (list #:phases
|
| 3863 | #~(modify-phases %standard-phases
|
| 3864 | (add-after 'install 'wrap-binaries
|
| 3865 | (lambda* (#:key inputs #:allow-other-keys)
|
| 3866 | (substitute* (string-append #$output "/sbin/virt-what")
|
| 3867 | (("^PATH=\".*\"")
|
| 3868 | (simple-format #f "PATH=\"~a\""
|
| 3869 | (string-join
|
| 3870 | (search-path-as-list '("bin" "sbin" "libexec")
|
| 3871 | (cons #$output (map cdr inputs)))
|
| 3872 | ":")))))))))
|
| 3873 | (native-inputs
|
| 3874 | (list perl))
|
| 3875 | (inputs
|
| 3876 | (list coreutils
|
| 3877 | bash-minimal
|
| 3878 | dmidecode
|
| 3879 | util-linux
|
| 3880 | which))
|
| 3881 | (home-page "https://people.redhat.com/~rjones/virt-what/")
|
| 3882 | (synopsis "Detect if running in a virtual machine")
|
| 3883 | (description
|
| 3884 | "@code{virt-what} is a program which can be used to detect if the program
|
| 3885 | is running in a virtual machine.
|
| 3886 |
|
| 3887 | The program prints out a list of \"facts\" about the virtual machine,
|
| 3888 | derived from heuristics. One fact is printed per line.")
|
| 3889 | (license license:gpl2+)))
|