2018-09-15 21:49:44 +01:00
|
|
|
{ appleDerivation }:
|
2017-05-23 23:58:08 +01:00
|
|
|
|
|
|
|
appleDerivation {
|
2018-01-31 23:26:49 +00:00
|
|
|
patches = [ ./clang-5.patch ];
|
|
|
|
|
2017-05-23 23:58:08 +01:00
|
|
|
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
|
2018-05-03 19:35:01 +01:00
|
|
|
rm -rf $out/usr
|
2017-05-23 23:58:08 +01:00
|
|
|
'';
|
|
|
|
}
|