summary refs log tree commit diff
path: root/pkgs/os-specific/darwin/apple-source-releases/configd/default.nix
diff options
context:
space:
mode:
authorVladimír Čunát <v@cunat.cz>2023-11-16 22:06:22 +0100
committerVladimír Čunát <v@cunat.cz>2023-11-16 22:06:22 +0100
commita7a8f8253db3f32cc15baf527d36ef7171425eba (patch)
tree5de25f1c82e7892f6aec7b3e5ddb718ff0c50df2 /pkgs/os-specific/darwin/apple-source-releases/configd/default.nix
parentf31242fcfd14e870eb6898fc8849bc4dee883054 (diff)
parent391aafc3d6b17ed5517795eb8b9c41ed7c6082e3 (diff)
Merge #263535: staging-next 2023-10-26
Diffstat (limited to 'pkgs/os-specific/darwin/apple-source-releases/configd/default.nix')
-rw-r--r--pkgs/os-specific/darwin/apple-source-releases/configd/default.nix18
1 files changed, 10 insertions, 8 deletions
diff --git a/pkgs/os-specific/darwin/apple-source-releases/configd/default.nix b/pkgs/os-specific/darwin/apple-source-releases/configd/default.nix
index 38b13f784a328..998bc867e757f 100644
--- a/pkgs/os-specific/darwin/apple-source-releases/configd/default.nix
+++ b/pkgs/os-specific/darwin/apple-source-releases/configd/default.nix
@@ -1,11 +1,19 @@
-{ lib, stdenv, appleDerivation', launchd, bootstrap_cmds, xnu, xpc, ppp, IOKit, eap8021x, Security
+{ lib, stdenv, runCommand, appleDerivation', launchd, bootstrap_cmds, swift-corelibs-foundation, xnu, xpc, ppp, IOKit, eap8021x, Security
 , headersOnly ? false }:
 
+let
+  privateHeaders = runCommand "swift-corelibs-foundation-private" { } ''
+    mkdir -p $out/include/CoreFoundation
+
+    cp ${swift-corelibs-foundation}/Library/Frameworks/CoreFoundation.framework/PrivateHeaders/* \
+      $out/include/CoreFoundation
+  '';
+in
 appleDerivation' stdenv {
   meta.broken = stdenv.cc.nativeLibc;
 
   nativeBuildInputs = lib.optionals (!headersOnly) [ bootstrap_cmds ];
-  buildInputs = lib.optionals (!headersOnly) [ launchd ppp xpc IOKit eap8021x ];
+  buildInputs = lib.optionals (!headersOnly) [ privateHeaders launchd ppp xpc IOKit eap8021x ];
 
   propagatedBuildInputs = lib.optionals (!headersOnly) [ Security ];
 
@@ -13,7 +21,6 @@ appleDerivation' stdenv {
     NIX_CFLAGS_COMPILE = toString [
       "-ISystemConfiguration.framework/Headers"
       "-I${xnu}/Library/Frameworks/System.framework/Versions/B/PrivateHeaders"
-      "-D_DNS_SD_LIBDISPATCH" # Needed for DNSServiceSetDispatchQueue to be available
     ];
   };
 
@@ -23,11 +30,6 @@ appleDerivation' stdenv {
 
     substituteInPlace SystemConfiguration.fproj/SCNetworkReachability.c \
       --replace ''$'#define\tHAVE_VPN_STATUS' ""
-
-    # Our neutered CoreFoundation doesn't have this function, but I think we'll live...
-    substituteInPlace SystemConfiguration.fproj/SCNetworkConnectionPrivate.c \
-      --replace 'CFPreferencesAppValueIsForced(serviceID, USER_PREFERENCES_APPLICATION_ID)' 'FALSE' \
-      --replace 'CFPreferencesAppValueIsForced(userPrivate->serviceID, USER_PREFERENCES_APPLICATION_ID)' 'FALSE'
   '';
 
   dontBuild = headersOnly;