dotfiles-guix/modules/home-packages/virtualization.scm
2023-09-07 15:20:42 -04:00

88 lines
3.4 KiB
Scheme

(define-module (home-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 (home-packages firmware)
#:use-module (guix gexp))
(define-public libvirt-new
(package
(inherit libvirt)
(name "libvirt-new")
(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))
(let ((fmw (string-append #$output "/usr/share/OVMF")))
(mkdir-p fmw)
(copy-recursively #$(file-append ovmf-new "/share/firmware") fmw))
))
))))))
(define-public virt-manager-new
(package
(inherit virt-manager)
(name "virt-manager-new")
(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))
(let ((fmw (string-append #$output "/usr/share/OVMF")))
(mkdir-p fmw)
(copy-recursively #$(file-append ovmf-new "/share/firmware") fmw))
))
))))))
;; (define-public libvirt-new
;; (package
;; (inherit libvirt)
;; (inputs
;; (modify-inputs (package-inputs libvirt)
;; (append ovmf-new)))
;; (arguments
;; (substitute-keyword-arguments (package-arguments libvirt)
;; ((#: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))
;; ))
;; ))))))
;; (define-public virt-manager-new
;; (package
;; (inherit virt-manager)
;; (name "virt-manager-new")
;; (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)
;; )))
;; ))))))