aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authoraxtloss <axtlos@tar.black>2022-10-12 20:41:19 +0200
committeraxtloss <axtlos@tar.black>2022-10-12 20:41:19 +0200
commit74df850507ff2e79140a1ebdef5222aa6b8ce3e1 (patch)
tree74a828c5720194a777f062438198c7efd2b13be0
parentb8f798df1f0083380f71e27fb4a73eb7c7b02793 (diff)
downloadflatpaks-74df850507ff2e79140a1ebdef5222aa6b8ce3e1.tar.gz
flatpaks-74df850507ff2e79140a1ebdef5222aa6b8ce3e1.tar.bz2
Add com.github.kholia.osx-kvm
Diffstat (limited to '')
-rw-r--r--com.github.kholia.osx-kvm/README.md2
-rw-r--r--com.github.kholia.osx-kvm/com.github.kholia.osx-kvm.yml44
-rw-r--r--com.github.kholia.osx-kvm/run.sh12
3 files changed, 58 insertions, 0 deletions
diff --git a/com.github.kholia.osx-kvm/README.md b/com.github.kholia.osx-kvm/README.md
new file mode 100644
index 0000000..47ba8a4
--- /dev/null
+++ b/com.github.kholia.osx-kvm/README.md
@@ -0,0 +1,2 @@
+# [OSX-KVM](https://github.com/kholia/OSX-KVM)
+This (surprisingly) works
diff --git a/com.github.kholia.osx-kvm/com.github.kholia.osx-kvm.yml b/com.github.kholia.osx-kvm/com.github.kholia.osx-kvm.yml
new file mode 100644
index 0000000..0619aa9
--- /dev/null
+++ b/com.github.kholia.osx-kvm/com.github.kholia.osx-kvm.yml
@@ -0,0 +1,44 @@
+app-id: com.github.kholia.osx-kvm
+runtime: org.freedesktop.Platform
+runtime-version: '22.08'
+sdk: org.freedesktop.Sdk
+command: run
+
+finish-args:
+ - --socket=x11
+ - --share=ipc
+ - --share=network
+ - --socket=pulseaudio
+ - --device=all
+
+modules:
+ - name: qemu
+ config-opts:
+ - "--disable-user"
+ - "--enable-kvm"
+ - "--disable-spice"
+ - "--disable-opengl"
+ - "--disable-virglrenderer"
+ - "--disable-usb-redir"
+ - "--disable-smartcard"
+ - "--python=/bin/python3"
+ - "--target-list=x86_64-softmmu"
+ sources:
+ - type: archive
+ url: https://download.qemu.org/qemu-6.2.0.tar.xz
+ sha256: 68e15d8e45ac56326e0b9a4afa8b49a3dfe8aba3488221d098c84698bca65b45
+ - name: macos
+ buildsystem: simple
+ sources:
+ - type: git
+ url: https://github.com/kholia/osx-kvm
+ branch: master
+ dest: osx-kvm
+ - type: file
+ path: ./run.sh
+ # - type: file
+ # path: ./mac.desktop
+ build-commands:
+ - install -Dm755 run.sh /app/bin/run
+ # - install -Dm755 ./mac.desktop /app/share/applications/com.github.kholia.osx-kvm.desktop
+ - mv osx-kvm /app/osx-kvm
diff --git a/com.github.kholia.osx-kvm/run.sh b/com.github.kholia.osx-kvm/run.sh
new file mode 100644
index 0000000..2e32300
--- /dev/null
+++ b/com.github.kholia.osx-kvm/run.sh
@@ -0,0 +1,12 @@
+#!/usr/bin/bash
+DESTDIR=$(realpath ~/.var/app/com.github.kholia.osx-kvm/)
+if [[ ! -f ${DESTDIR}/osx-kvm/mac_hdd_ng.img ]]; then
+ rm ${DESTDIR}/osx-kvm
+ cp -r /app/osx-kvm ${DESTDIR}/osx-kvm
+ cd ${DESTDIR}/osx-kvm
+ echo "4" | ${DESTDIR}/osx-kvm/fetch-macOS-v2.py
+ qemu-img convert BaseSystem.dmg -O raw BaseSystem.img
+ qemu-img create -f qcow2 mac_hdd_ng.img 128G
+ ./OpenCore-Boot.sh
+fi
+