edk2/OVMF: Support build on macOS
In order to use OVMF firmware with e.g. qemu on macOS, these packages needed to be made macOS ready. This meant choosing the clang build in this case, because it is the only one working on macOS. Unfortunately, just using clang on all platforms doesn't work because there are hardcoded assumptions in the edk2 build system.
This commit is contained in:
@@ -17,9 +17,13 @@ let
|
||||
throw "Unsupported architecture";
|
||||
|
||||
version = lib.getVersion edk2;
|
||||
buildType = if stdenv.isDarwin then
|
||||
"CLANGPDB"
|
||||
else
|
||||
"GCC5";
|
||||
in
|
||||
|
||||
edk2.mkDerivation projectDscPath {
|
||||
edk2.mkDerivation projectDscPath buildType {
|
||||
name = "OVMF-${version}";
|
||||
|
||||
outputs = [ "out" "fd" ];
|
||||
@@ -57,6 +61,6 @@ edk2.mkDerivation projectDscPath {
|
||||
description = "Sample UEFI firmware for QEMU and KVM";
|
||||
homepage = https://github.com/tianocore/tianocore.github.io/wiki/OVMF;
|
||||
license = stdenv.lib.licenses.bsd2;
|
||||
platforms = ["x86_64-linux" "i686-linux" "aarch64-linux"];
|
||||
platforms = ["x86_64-linux" "i686-linux" "aarch64-linux" "x86_64-darwin"];
|
||||
};
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user