1 { lib, appleDerivation, xcbuildHook, llvmPackages, makeWrapper }:
4 nativeBuildInputs = [ xcbuildHook makeWrapper ];
7 # The following copied from
8 # https://github.com/Homebrew/homebrew-core/commit/712ed3e948868e17f96b7e59972b5f45d4faf688
9 # is needed to build libvirt.
10 ./rpcgen-support-hyper-and-quad-types.patch
14 makeWrapper ${llvmPackages.clang}/bin/clang $out/bin/clang-cpp --add-flags "--driver-mode=cpp"
15 substituteInPlace rpcgen/rpc_main.c \
16 --replace "/usr/bin/cpp" "$out/bin/clang-cpp"
19 # Workaround build failure on -fno-common toolchains:
20 # duplicate symbol '_btype_2' in:args.o pr_comment.o
21 env.NIX_CFLAGS_COMPILE = "-fcommon";
23 # temporary install phase until xcodebuild has "install" support
25 for f in Products/Release/*; do
27 install -D $f $out/bin/$(basename $f)
32 mkdir -p $out/share/man/man$n
33 install */*.$n $out/share/man/man$n
38 platforms = lib.platforms.darwin;
39 maintainers = with lib.maintainers; [ matthewbauer ];