summary refs log tree commit diff
path: root/pkgs/os-specific/darwin/swift-corelibs/corefoundation.nix
diff options
context:
space:
mode:
authorRandy Eckenrode <randy@largeandhighquality.com>2023-06-29 20:31:15 -0400
committerRandy Eckenrode <randy@largeandhighquality.com>2023-07-02 17:56:25 -0400
commit8c16d17bdc9c0da8bc655cfc4ef601b1b9bef2d6 (patch)
treed575efd10710cec8b8ae60b1d9fc7ed3a020aa5f /pkgs/os-specific/darwin/swift-corelibs/corefoundation.nix
parenta845397040d1b85cec4ee41edb8598d8086c3d95 (diff)
downloadnixpkgs-8c16d17bdc9c0da8bc655cfc4ef601b1b9bef2d6.tar
nixpkgs-8c16d17bdc9c0da8bc655cfc4ef601b1b9bef2d6.tar.gz
nixpkgs-8c16d17bdc9c0da8bc655cfc4ef601b1b9bef2d6.tar.bz2
nixpkgs-8c16d17bdc9c0da8bc655cfc4ef601b1b9bef2d6.tar.lz
nixpkgs-8c16d17bdc9c0da8bc655cfc4ef601b1b9bef2d6.tar.xz
nixpkgs-8c16d17bdc9c0da8bc655cfc4ef601b1b9bef2d6.tar.zst
nixpkgs-8c16d17bdc9c0da8bc655cfc4ef601b1b9bef2d6.zip
swift-corelibs: fix build with clang 16
swift-corelibs fails to build due to a missing header and an invalid
pointer conversion. Patches are provided to fix both of these issues.
Diffstat (limited to 'pkgs/os-specific/darwin/swift-corelibs/corefoundation.nix')
-rw-r--r--pkgs/os-specific/darwin/swift-corelibs/corefoundation.nix14
1 files changed, 10 insertions, 4 deletions
diff --git a/pkgs/os-specific/darwin/swift-corelibs/corefoundation.nix b/pkgs/os-specific/darwin/swift-corelibs/corefoundation.nix
index 1e7aeb3689e..3db9073ad55 100644
--- a/pkgs/os-specific/darwin/swift-corelibs/corefoundation.nix
+++ b/pkgs/os-specific/darwin/swift-corelibs/corefoundation.nix
@@ -1,4 +1,4 @@
-{ lib, stdenv, fetchFromGitHub, fetchurl, makeSetupHook, ninja, python3, curl, libxml2, objc4, ICU }:
+{ lib, stdenv, fetchFromGitHub, fetchurl, makeSetupHook, ninja, launchd, libdispatch, python3, curl, libxml2, objc4, ICU }:
 
 let
   # 10.12 adds a new sysdir.h that our version of CF in the main derivation depends on, but
@@ -22,9 +22,15 @@ stdenv.mkDerivation {
   };
 
   nativeBuildInputs = [ ninja python3 ];
-  buildInputs = [ curl libxml2 objc4 ICU ];
-
-  patches = [ ./0001-Add-missing-TARGET_OS_-defines.patch ];
+  buildInputs = [ (lib.getDev launchd) libdispatch libxml2 objc4 ICU ];
+
+  patches = [
+    ./0001-Add-missing-TARGET_OS_-defines.patch
+    # CFMessagePort.h uses `bootstrap_check_in` without declaring it, which is defined in the launchd headers.
+    ./0002-Add-missing-launchd-header.patch
+    # CFURLComponents fails to build with clang 16 due to an invalid pointer conversion. This is fixed upstream.
+    ./0003-Fix-incompatible-pointer-conversion.patch
+  ];
 
   postPatch = ''
     cd CoreFoundation