Skip to content

Commit

Permalink
OVMF: fix build on x86_64-darwin
Browse files Browse the repository at this point in the history
  • Loading branch information
reckenrode committed Nov 7, 2022
1 parent 4d3207e commit b808a35
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions pkgs/applications/virtualization/OVMF/default.nix
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{ stdenv, nixosTests, lib, edk2, util-linux, nasm, acpica-tools
{ stdenv, nixosTests, lib, edk2, util-linux, nasm, acpica-tools, llvmPackages
, csmSupport ? false, seabios ? null
, secureBoot ? false
, httpSupport ? false
Expand Down Expand Up @@ -33,7 +33,8 @@ edk2.mkDerivation projectDscPath (finalAttrs: {

outputs = [ "out" "fd" ];

nativeBuildInputs = [ util-linux nasm acpica-tools ];
nativeBuildInputs = [ util-linux nasm acpica-tools ]
++ lib.optionals stdenv.cc.isClang [ llvmPackages.bintools llvmPackages.llvm ];
strictDeps = true;

hardeningDisable = [ "format" "stackprotector" "pic" "fortify" ];
Expand All @@ -44,6 +45,8 @@ edk2.mkDerivation projectDscPath (finalAttrs: {
++ lib.optionals httpSupport [ "-D NETWORK_HTTP_ENABLE=TRUE" "-D NETWORK_HTTP_BOOT_ENABLE=TRUE" ]
++ lib.optionals tpmSupport [ "-D TPM_ENABLE" "-D TPM2_ENABLE" "-D TPM2_CONFIG_ENABLE"];

NIX_CFLAGS_COMPILE = lib.optional stdenv.cc.isClang "-Qunused-arguments";

postPatch = lib.optionalString csmSupport ''
cp ${seabios}/Csm16.bin OvmfPkg/Csm/Csm16/Csm16.bin
'';
Expand Down

0 comments on commit b808a35

Please sign in to comment.