guix-dotfiles/modules/ryan-packages/virtualization.scm

46 lines
1.8 KiB
Scheme
Raw Normal View History

2023-09-07 14:45:05 -04:00
;;; Stolen from https://g.tylerm.dev/tylerm/dotfiles/raw/branch/main/modules/home-packages/virtualization.scm
(define-module (ryan-packages virtualization)
#:use-module (guix packages)
#:use-module (guix utils)
#:use-module (gnu packages)
#:use-module (gnu packages package-management)
#:use-module (gnu packages build-tools)
#:use-module (gnu packages virtualization)
#:use-module (gnu packages firmware)
#:use-module (guix gexp))
(define-public libvirt-ovmf
2023-09-07 14:45:05 -04:00
(package
(inherit libvirt)
(name "libvirt-ovmf")
2023-09-07 14:45:05 -04:00
(inputs
(modify-inputs (package-inputs libvirt)
(append qemu)))
(arguments
(substitute-keyword-arguments (package-arguments libvirt)
((#:phases phases)
#~(modify-phases #$phases
(add-after 'install 'install-firmware
(lambda _
(let ((fmw (string-append #$output "/share/qemu")))
(mkdir-p fmw)
(copy-recursively #$(file-append qemu "/share/qemu") fmw))))))))))
2023-09-07 14:45:05 -04:00
(define-public virt-manager-ovmf
(package
(inherit virt-manager)
(name "virt-manager-ovmf")
(inputs
(modify-inputs (package-inputs virt-manager)
(append qemu)))
(arguments
(substitute-keyword-arguments (package-arguments virt-manager)
((#:phases phases)
#~(modify-phases #$phases
(add-after 'install 'install-firmware
(lambda _
(let ((fmw (string-append #$output "/share/qemu")))
(mkdir-p fmw)
(copy-recursively #$(file-append qemu "/share/firmware") fmw))))))))))