<commit_before>{ stdenv, appleDerivation, xcbuildHook
, openssl, Librpcsvc, xnu, libpcap, developer_cmds }:

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

  NIX_CFLAGS_COMPILE = " -I./unbound -I${xnu}/Library/Frameworks/System.framework/Headers/";

  # "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
  patchPhase = ''
    substituteInPlace network_cmds.xcodeproj/project.pbxproj \
      --replace "7294F0EA0EE8BAC80052EC88 /* PBXTargetDependency */," "" \
      --replace "7216D34D0EE89FEC00AE70E4 /* PBXTargetDependency */," "" \
      --replace "72CD1D9C0EE8C47C005F825D /* PBXTargetDependency */," "" \
      --replace "7216D2C20EE89ADF00AE70E4 /* PBXTargetDependency */," ""
  '';

  # temporary install phase until xcodebuild has "install" support
  installPhase = ''
    for f in Products/Release/*; do<commit_msg>darwin.network_cmds: pin to openssl 1.0.2<commit_after>{ stdenv, appleDerivation, xcbuildHook
, openssl_1_0_2, Librpcsvc, xnu, libpcap, developer_cmds }:

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

  NIX_CFLAGS_COMPILE = " -I./unbound -I${xnu}/Library/Frameworks/System.framework/Headers/";

  # "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
  patchPhase = ''
    substituteInPlace network_cmds.xcodeproj/project.pbxproj \
      --replace "7294F0EA0EE8BAC80052EC88 /* PBXTargetDependency */," "" \
      --replace "7216D34D0EE89FEC00AE70E4 /* PBXTargetDependency */," "" \
      --replace "72CD1D9C0EE8C47C005F825D /* PBXTargetDependency */," "" \
      --replace "7216D2C20EE89ADF00AE70E4 /* PBXTargetDependency */," ""
  '';

  # temporary install phase until xcodebuild has "install" support
  installPhase = ''
    for f in Products/Release/*; do
{'fraction_non_alphanumeric': 0.11420612813370473, 'fraction_numerical': 0.058031569173630455, 'mean_word_length': 4.130952380952381, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1464787', 'n_tokens_mistral': 816, 'n_tokens_neox': 742, 'n_words': 159}