From 684963881b19d2c93adf4423d293357a89b9f253 Mon Sep 17 00:00:00 2001 From: Dmitry Kalinkin Date: Thu, 28 Jan 2021 16:55:53 -0500 Subject: [PATCH] darwin.CF: fix sandboxed build Had to abandon the use of sourceRoot primarily because it prevents stdenv from chmod'ing the ../configure into a writable file. --- pkgs/os-specific/darwin/swift-corelibs/corefoundation.nix | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/pkgs/os-specific/darwin/swift-corelibs/corefoundation.nix b/pkgs/os-specific/darwin/swift-corelibs/corefoundation.nix index 9f0ee4db118..560be0c31ab 100644 --- a/pkgs/os-specific/darwin/swift-corelibs/corefoundation.nix +++ b/pkgs/os-specific/darwin/swift-corelibs/corefoundation.nix @@ -23,9 +23,9 @@ stdenv.mkDerivation { nativeBuildInputs = [ ninja python3 ]; buildInputs = [ curl libxml2 objc4 ICU ]; - sourceRoot = "source/CoreFoundation"; + postPatch = '' + cd CoreFoundation - patchPhase = '' cp ${sysdir-free-system-directories} Base.subproj/CFSystemDirectories.c # In order, since I can't comment individual lines: @@ -39,6 +39,7 @@ stdenv.mkDerivation { # Fix sandbox impurities. substituteInPlace ../lib/script.py \ --replace '/bin/cp' cp + patchShebangs --build ../configure # Includes xpc for some initialization routine that they don't define anyway, so no harm here substituteInPlace PlugIn.subproj/CFBundlePriv.h \