mirror of
https://github.com/ilyakooo0/nixpkgs.git
synced 2024-11-11 15:27:20 +03:00
Merge pull request #18930 from acowley/mlton-darwin-bootstrap
mlton: darwin bootstrap fixes
This commit is contained in:
commit
67baa48161
@ -63,6 +63,8 @@ stdenv.mkDerivation rec {
|
||||
substituteInPlace $(pwd)/../${usr_prefix}/bin/mlton --replace '/${usr_prefix}/lib/mlton' $(pwd)/../${usr_prefix}/lib/mlton
|
||||
'' + stdenv.lib.optionalString stdenv.cc.isClang ''
|
||||
sed -i "s_ patch -s -p0 <gdtoa.hide-public-fns.patch_ patch -s -p0 <gdtoa.hide-public-fns.patch\n\tsed -i 's|printf(emptyfmt|printf(\"\"|g' ./gdtoa/arithchk.c_" ./runtime/Makefile
|
||||
'' + stdenv.lib.optionalString stdenv.isDarwin ''
|
||||
sed -i 's|XCFLAGS += -I/usr/local/include -I/sw/include -I/opt/local/include||' ./runtime/Makefile
|
||||
'';
|
||||
|
||||
preBuild = ''
|
||||
@ -83,6 +85,11 @@ stdenv.mkDerivation rec {
|
||||
for e in mllex mlyacc ; do
|
||||
patchelf --set-interpreter ${dynamic_linker} $(pwd)/../${usr_prefix}/bin/$e
|
||||
done
|
||||
'' + stdenv.lib.optionalString stdenv.isDarwin ''
|
||||
# Patch libgmp linking
|
||||
install_name_tool -change /opt/local/lib/libgmp.10.dylib ${gmp}/lib/libgmp.10.dylib $(pwd)/../${usr_prefix}/lib/mlton/mlton-compile
|
||||
install_name_tool -change /opt/local/lib/libgmp.10.dylib ${gmp}/lib/libgmp.10.dylib $(pwd)/../${usr_prefix}/bin/mlyacc
|
||||
install_name_tool -change /opt/local/lib/libgmp.10.dylib ${gmp}/lib/libgmp.10.dylib $(pwd)/../${usr_prefix}/bin/mllex
|
||||
'';
|
||||
|
||||
doCheck = true;
|
||||
|
Loading…
Reference in New Issue
Block a user