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.
This commit is contained in:
Dmitry Kalinkin 2021-01-28 16:55:53 -05:00
parent 798f7b136c
commit 684963881b
No known key found for this signature in database
GPG Key ID: 5157B3EC8B2CA333

View File

@ -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 \