qemu: set min version to 13 on darwin

the warnings went unnoticed when the sdk was bumped. updating the min
version to 13 fixes them

```
./target/arm/hvf/hvf.c:974:29: warning: 'hv_vm_config_create' is only available on macOS 13.0 or newer [-Wunguarded-availability-new]
  974 |     hv_vm_config_t config = hv_vm_config_create();
      |                             ^~~~~~~~~~~~~~~~~~~
```

add the sdk and version hook in depsBuildBuild
This commit is contained in:
Reno Dakota
2024-12-27 12:35:39 -08:00
parent c836511199
commit 84145f7bda
@@ -4,7 +4,7 @@
, sigtool
, makeWrapper, removeReferencesTo
, attr, libcap, libcap_ng, socat, libslirp
, apple-sdk_13, rez, setfile
, apple-sdk_13, darwinMinVersionHook, rez, setfile
, guestAgentSupport ? (with stdenv.hostPlatform; isLinux || isNetBSD || isOpenBSD || isSunOS || isWindows) && !minimal
, numaSupport ? stdenv.hostPlatform.isLinux && !stdenv.hostPlatform.isAarch32 && !minimal, numactl
, seccompSupport ? stdenv.hostPlatform.isLinux && !minimal, libseccomp
@@ -56,6 +56,11 @@ assert lib.assertMsg (xenSupport -> hostCpuTargets == [ "i386-softmmu" ]) "Xen s
let
hexagonSupport = hostCpuTargets == null || lib.elem "hexagon" hostCpuTargets;
# needed in buildInputs and depsBuildBuild
# check log for warnings eg: `warning: 'hv_vm_config_get_max_ipa_size' is only available on macOS 13.0`
# to indicate if min version needs to get bumped.
darwinSDK = [ apple-sdk_13 (darwinMinVersionHook "13") ];
in
stdenv.mkDerivation (finalAttrs: {
@@ -73,6 +78,7 @@ stdenv.mkDerivation (finalAttrs: {
};
depsBuildBuild = [ buildPackages.stdenv.cc ]
++ lib.optionals stdenv.buildPlatform.isDarwin darwinSDK
++ lib.optionals hexagonSupport [ pkg-config ];
nativeBuildInputs = [
@@ -92,7 +98,7 @@ stdenv.mkDerivation (finalAttrs: {
++ lib.optionals (!minimal) [ dtc pixman vde2 lzo snappy libtasn1 gnutls nettle libslirp ]
++ lib.optionals (!userOnly) [ curl ]
++ lib.optionals ncursesSupport [ ncurses ]
++ lib.optionals stdenv.hostPlatform.isDarwin [ apple-sdk_13 ]
++ lib.optionals stdenv.hostPlatform.isDarwin darwinSDK
++ lib.optionals seccompSupport [ libseccomp ]
++ lib.optionals numaSupport [ numactl ]
++ lib.optionals alsaSupport [ alsa-lib ]