diff options
| author | Ryan Schanzenbacher <ryan@rschanz.org> | 2023-09-07 14:45:05 -0400 |
|---|---|---|
| committer | Ryan Schanzenbacher <ryan@rschanz.org> | 2023-09-07 14:45:05 -0400 |
| commit | 43ea80ea908a4c7070e09f70d4fc63acd34cdace (patch) | |
| tree | ab6ef8194730eac8872a6e2833410fc9e80ae630 /modules/ryan-packages/virtualization.scm | |
| parent | 438237dbff8b535bfcf4cac7625c9b085e4b6c53 (diff) | |
libvirt pain
Diffstat (limited to 'modules/ryan-packages/virtualization.scm')
| -rw-r--r-- | modules/ryan-packages/virtualization.scm | 49 |
1 files changed, 49 insertions, 0 deletions
diff --git a/modules/ryan-packages/virtualization.scm b/modules/ryan-packages/virtualization.scm new file mode 100644 index 0000000..d43a337 --- /dev/null +++ b/modules/ryan-packages/virtualization.scm | |||
| @@ -0,0 +1,49 @@ | |||
| 1 | ;;; Stolen from https://g.tylerm.dev/tylerm/dotfiles/raw/branch/main/modules/home-packages/virtualization.scm | ||
| 2 | |||
| 3 | (define-module (ryan-packages virtualization) | ||
| 4 | #:use-module (guix packages) | ||
| 5 | #:use-module (guix utils) | ||
| 6 | #:use-module (gnu packages) | ||
| 7 | #:use-module (gnu packages package-management) | ||
| 8 | #:use-module (gnu packages build-tools) | ||
| 9 | #:use-module (gnu packages virtualization) | ||
| 10 | #:use-module (gnu packages firmware) | ||
| 11 | #:use-module (guix gexp)) | ||
| 12 | |||
| 13 | (define ovmf-new | ||
| 14 | (package | ||
| 15 | (inherit ovmf) | ||
| 16 | (name "ovmf-new") | ||
| 17 | (arguments | ||
| 18 | (substitute-keyword-arguments (package-arguments ovmf) | ||
| 19 | ((#:phases phases) | ||
| 20 | #~(modify-phases #$phases | ||
| 21 | (replace 'install | ||
| 22 | (lambda _ | ||
| 23 | (let ((fmw (string-append #$output "/share/firmware"))) | ||
| 24 | (mkdir-p fmw) | ||
| 25 | (copy-recursively "Build/OvmfX64/RELEASE_GCC49/FV" fmw)))))))))) | ||
| 26 | |||
| 27 | (define-public libvirt-new | ||
| 28 | (package | ||
| 29 | (inherit libvirt) | ||
| 30 | (name "libvirt-new") | ||
| 31 | (inputs | ||
| 32 | (modify-inputs (package-inputs libvirt) | ||
| 33 | (append ovmf-new))))) | ||
| 34 | |||
| 35 | (define-public virt-manager-ovmf | ||
| 36 | (package | ||
| 37 | (inherit virt-manager) | ||
| 38 | (name "virt-manager-ovmf") | ||
| 39 | (arguments | ||
| 40 | (substitute-keyword-arguments (package-arguments virt-manager) | ||
| 41 | ((#:phases phases) | ||
| 42 | #~(modify-phases #$phases | ||
| 43 | (add-after 'install 'ovmf | ||
| 44 | (lambda _ | ||
| 45 | (let ((fmw (string-append #$output "/usr/share/OVMF"))) | ||
| 46 | (mkdir-p fmw) | ||
| 47 | (copy-recursively #$(file-append ovmf-new "/share/firmware") fmw) | ||
| 48 | ;(mkdir-p fmw) | ||
| 49 | (copy-recursively "Build/OvmfX64/RELEASE_GCC49/FV" fmw)))))))))) | ||
