2016-11-10 05:30:32 +01:00
|
|
|
{ stdenv, appleDerivation, xcbuild, openssl, Librpcsvc, xnu, libpcap, developer_cmds }:
|
|
|
|
|
|
|
|
appleDerivation rec {
|
|
|
|
buildInputs = [ xcbuild openssl xnu Librpcsvc libpcap developer_cmds ];
|
|
|
|
|
2016-11-12 22:51:25 +01:00
|
|
|
NIX_CFLAGS_COMPILE = " -I./unbound -I${xnu}/Library/Frameworks/System.framework/Headers/";
|
2016-11-10 05:30:32 +01:00
|
|
|
|
2016-11-10 21:56:58 +01:00
|
|
|
# "spray" requires some files that aren't compiling correctly in xcbuild.
|
|
|
|
# "rtadvd" seems to fail with some missing constants.
|
|
|
|
# We disable spray and rtadvd here for now.
|
2016-11-10 05:30:32 +01:00
|
|
|
patchPhase = ''
|
|
|
|
substituteInPlace network_cmds.xcodeproj/project.pbxproj \
|
|
|
|
--replace "7294F0EA0EE8BAC80052EC88 /* PBXTargetDependency */," "" \
|
|
|
|
--replace "7216D34D0EE89FEC00AE70E4 /* PBXTargetDependency */," ""
|
|
|
|
'';
|
|
|
|
|
|
|
|
# temporary install phase until xcodebuild has "install" support
|
|
|
|
installPhase = ''
|
|
|
|
mkdir -p $out/bin/
|
2016-11-10 06:07:24 +01:00
|
|
|
install network_cmds-*/Build/Products/Release/* $out/bin/
|
2016-11-10 05:30:32 +01:00
|
|
|
|
|
|
|
for n in 1 5; do
|
|
|
|
mkdir -p $out/share/man/man$n
|
|
|
|
install */*.$n $out/share/man/man$n
|
|
|
|
done
|
|
|
|
|
2016-11-10 21:56:58 +01:00
|
|
|
# TODO: patch files to load from $out/ instead of /usr/
|
2016-11-10 05:30:32 +01:00
|
|
|
|
2016-11-10 21:56:58 +01:00
|
|
|
# mkdir -p $out/etc/
|
|
|
|
# install rtadvd.tproj/rtadvd.conf ip6addrctl.tproj/ip6addrctl.conf $out/etc/
|
2016-11-10 05:30:32 +01:00
|
|
|
|
2016-11-10 21:56:58 +01:00
|
|
|
# mkdir -p $out/local/OpenSourceVersions/
|
|
|
|
# install network_cmds.plist $out/local/OpenSourceVersions/
|
|
|
|
|
|
|
|
# mkdir -p $out/System/Library/LaunchDaemons
|
|
|
|
# install kdumpd.tproj/com.apple.kdumpd.plist $out/System/Library/LaunchDaemons
|
2016-11-10 05:30:32 +01:00
|
|
|
'';
|
|
|
|
|
|
|
|
meta = {
|
|
|
|
platforms = stdenv.lib.platforms.darwin;
|
|
|
|
maintainers = with stdenv.lib.maintainers; [ matthewbauer ];
|
|
|
|
};
|
|
|
|
}
|