diff --git a/packages/by-name/qemu-static/package.nix b/packages/by-name/qemu-static/package.nix index cd29c64f02..f855e725db 100644 --- a/packages/by-name/qemu-static/package.nix +++ b/packages/by-name/qemu-static/package.nix @@ -21,6 +21,11 @@ "-Dlinux_fdt_path=${dtc}/lib" ]; + # The upstream derivation removes the dtc dependency when minimal is set, + # but QEMU needs it when not only building usermode emulators. + # TODO(freax13): Fix this upstream. + buildInputs = previousAttrs.buildInputs ++ [ dtc ]; + nativeBuildInputs = previousAttrs.nativeBuildInputs ++ [ python3Packages.packaging ]; patches = [ diff --git a/packages/by-name/qemu-tdx-static/package.nix b/packages/by-name/qemu-tdx-static/package.nix index 574c41a19c..521cf11487 100644 --- a/packages/by-name/qemu-tdx-static/package.nix +++ b/packages/by-name/qemu-tdx-static/package.nix @@ -36,6 +36,11 @@ in "-Dlinux_fdt_path=${dtc}/lib" ]; + # The upstream derivation removes the dtc dependency when minimal is set, + # but QEMU needs it when not only building usermode emulators. + # TODO(freax13): Fix this upstream. + buildInputs = previousAttrs.buildInputs ++ [ dtc ]; + nativeBuildInputs = previousAttrs.nativeBuildInputs ++ [ python3Packages.packaging ]; prePatch = ''