nixpkgs/pkgs/os-specific/darwin/apple-source-releases/libutil/new.nix
Matthew Bauer 0534ceac81 xcbuild: move setup hook to xcbuildHook
Not every package that needs xcbuild will want to use its build phase.
I have moved the xcbuild setup hook to the new attribute xcbuildHook.
This means that dontUseXcbuild is no longer needed. If you just need
to call xcbuild on its own you can just refer to xcbuild.
2018-07-09 17:13:58 -04:00

29 lines
778 B
Nix

{ stdenv, appleDerivation, xcbuildHook }:
# TODO: make this the official libutil expression once we've integrated xcbuild in the bootstrap
appleDerivation {
nativeBuildInputs = [ xcbuildHook ];
prePatch = ''
substituteInPlace tzlink.c \
--replace '#include <xpc/xpc.h>' ""
'';
xcbuildFlags = "-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;
};
}