1 { lib, stdenv, stdenvNoCC, appleDerivation', xcbuildHook
3 # headersOnly is true when building for libSystem
4 , headersOnly ? false }:
6 appleDerivation' (if headersOnly then stdenvNoCC else stdenv) {
7 nativeBuildInputs = lib.optional (!headersOnly) xcbuildHook;
10 substituteInPlace tzlink.c \
11 --replace '#include <xpc/xpc.h>' ""
14 xcbuildFlags = [ "-target" "util" ];
18 '' + lib.optionalString headersOnly ''
20 '' + lib.optionalString (!headersOnly)''
21 mkdir -p $out/lib $out/include
23 cp Products/Release/*.dylib $out/lib
24 cp Products/Release/*.h $out/include
26 # TODO: figure out how to get this to be right the first time around
27 install_name_tool -id $out/lib/libutil.dylib $out/lib/libutil.dylib
30 # FIXME: headers are different against headersOnly. And all the headers are NOT in macos, do we really want them?
39 maintainers = with maintainers; [ copumpkin ];
40 platforms = platforms.darwin;
41 license = licenses.apple-psl20;