mirror of
https://git.in.rschanz.org/ryan77627/guix-config.git
synced 2025-01-30 18:31:18 -05:00
49 lines
1.9 KiB
Scheme
49 lines
1.9 KiB
Scheme
;;; 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 ovmf-new
|
|
(package
|
|
(inherit ovmf)
|
|
(name "ovmf-new")
|
|
(arguments
|
|
(substitute-keyword-arguments (package-arguments ovmf)
|
|
((#:phases phases)
|
|
#~(modify-phases #$phases
|
|
(replace 'install
|
|
(lambda _
|
|
(let ((fmw (string-append #$output "/share/firmware")))
|
|
(mkdir-p fmw)
|
|
(copy-recursively "Build/OvmfX64/RELEASE_GCC49/FV" fmw))))))))))
|
|
|
|
(define-public libvirt-new
|
|
(package
|
|
(inherit libvirt)
|
|
(name "libvirt-new")
|
|
(inputs
|
|
(modify-inputs (package-inputs libvirt)
|
|
(append ovmf-new)))))
|
|
|
|
(define-public virt-manager-ovmf
|
|
(package
|
|
(inherit virt-manager)
|
|
(name "virt-manager-ovmf")
|
|
(arguments
|
|
(substitute-keyword-arguments (package-arguments virt-manager)
|
|
((#:phases phases)
|
|
#~(modify-phases #$phases
|
|
(add-after 'install 'ovmf
|
|
(lambda _
|
|
(let ((fmw (string-append #$output "/usr/share/OVMF")))
|
|
(mkdir-p fmw)
|
|
(copy-recursively #$(file-append ovmf-new "/share/firmware") fmw)
|
|
;(mkdir-p fmw)
|
|
(copy-recursively "Build/OvmfX64/RELEASE_GCC49/FV" fmw))))))))))
|