3
0
Fork 0
forked from mirrors/nixpkgs
nixpkgs/pkgs/os-specific/darwin/apple-source-releases/libutil/new.nix
Matthew Bauer 65562e4cdd treewide: change install references for xcbuild
now build directory is "Products/Release/"
2018-04-09 18:35:35 -05:00

34 lines
809 B
Nix

{ stdenv, appleDerivation, xcbuild }:
# TODO: make this the official libutil expression once we've integrated xcbuild in the bootstrap
appleDerivation {
buildInputs = [ xcbuild ];
dontUseXcbuild = true;
prePatch = ''
substituteInPlace tzlink.c \
--replace '#include <xpc/xpc.h>' ""
'';
buildPhase = ''
xcodebuild -target util
'';
installPhase = ''
mkdir -p $out/lib $out/include
cp Products/Release/*.dylib $out/lib
cp Products/Release/*.h $out/include
# TODO: figure out how to get this to be right the first time around
install_name_tool -id $out/lib/libutil.dylib $out/lib/libutil.dylib
'';
meta = with stdenv.lib; {
maintainers = with maintainers; [ copumpkin ];
platforms = platforms.darwin;
license = licenses.apsl20;
};
}