nixpkgs/pkgs/os-specific/darwin/apple-source-releases/ICU/default.nix
Dan Peebles 110c252870 cctools: support LTO on Darwin
LTO is disabled during bootstrap to keep the bootstrap tools small and
avoid unnecessary LLVM rebuilds, but is enabled in the final stdenv
stage and should be usable by normal packages.
2018-09-16 02:12:11 -04:00

24 lines
599 B
Nix

{ appleDerivation }:
appleDerivation {
patches = [ ./clang-5.patch ];
postPatch = ''
substituteInPlace makefile \
--replace /usr/bin/ "" \
--replace '$(ISYSROOT)' "" \
--replace 'shell xcodebuild -version -sdk' 'shell true' \
--replace 'shell xcrun -sdk $(SDKPATH) -find' 'shell echo' \
--replace '-install_name $(libdir)' "-install_name $out/lib/" \
--replace /usr/local/bin/ /bin/ \
--replace /usr/lib/ /lib/ \
'';
makeFlags = [ "DSTROOT=$(out)" ];
postInstall = ''
mv $out/usr/local/include $out/include
rm -rf $out/usr
'';
}