Unverified Commit 2d82b295 authored by toonn's avatar toonn Committed by GitHub
Browse files

Merge pull request #224423 from reckenrode/network_cmds_fix

network_cmds: unconditionally exclude Unbound
parents 039a18a9 3753dfe6
Loading
Loading
Loading
Loading
+4 −6
Original line number Diff line number Diff line
{ lib, appleDerivation, xcbuildHook, stdenv
, libressl_3_4, Librpcsvc, xnu, libpcap, developer_cmds }:
, Librpcsvc, xnu, libpcap, developer_cmds }:

appleDerivation {
  nativeBuildInputs = [ xcbuildHook ];
  buildInputs = [ libressl_3_4 xnu Librpcsvc libpcap developer_cmds ];
  buildInputs = [ xnu Librpcsvc libpcap developer_cmds ];

  # Work around error from <stdio.h> on aarch64-darwin:
  #     error: 'TARGET_OS_IPHONE' is not defined, evaluates to 0 [-Werror,-Wundef-prefix=TARGET_OS_]
@@ -12,15 +12,13 @@ appleDerivation {
  # "spray" requires some files that aren't compiling correctly in xcbuild.
  # "rtadvd" seems to fail with some missing constants.
  # "traceroute6" and "ping6" require ipsec which doesn't build correctly
  # "unbound" doesn’t build against supported versions of OpenSSL or LibreSSL
  patchPhase = ''
    substituteInPlace network_cmds.xcodeproj/project.pbxproj \
      --replace "7294F0EA0EE8BAC80052EC88 /* PBXTargetDependency */," "" \
      --replace "7216D34D0EE89FEC00AE70E4 /* PBXTargetDependency */," "" \
      --replace "72CD1D9C0EE8C47C005F825D /* PBXTargetDependency */," "" \
      --replace "7216D2C20EE89ADF00AE70E4 /* PBXTargetDependency */," ""
  '' + lib.optionalString stdenv.isAarch64 ''
    # "unbound" does not build on aarch64
    substituteInPlace network_cmds.xcodeproj/project.pbxproj \
      --replace "7216D2C20EE89ADF00AE70E4 /* PBXTargetDependency */," "" \
      --replace "71D958C51A9455A000C9B286 /* PBXTargetDependency */," ""
  '';