2017-05-24 00:58:08 +02:00
|
|
|
{ stdenv, cctools, appleDerivation }:
|
|
|
|
|
|
|
|
appleDerivation {
|
2017-08-11 00:57:42 +02:00
|
|
|
nativeBuildInputs = [ cctools ];
|
2017-05-24 00:58:08 +02: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
|
|
|
|
'';
|
|
|
|
}
|