diff options
author | Joachim F <joachifm@users.noreply.github.com> | 2016-09-26 23:06:40 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2016-09-26 23:06:40 +0200 |
commit | 67baa48161b697b4e09eef1c3cb43b7ba6f68298 (patch) | |
tree | 26b9b72bed9f942da1368ad63d40c877e7e9e80b | |
parent | 240552cba1af2543a66e0e6b8149da2ed44415b6 (diff) | |
parent | 3835a1917fe063408658afb5f006bbe2f6f32042 (diff) | |
download | nixlib-67baa48161b697b4e09eef1c3cb43b7ba6f68298.tar nixlib-67baa48161b697b4e09eef1c3cb43b7ba6f68298.tar.gz nixlib-67baa48161b697b4e09eef1c3cb43b7ba6f68298.tar.bz2 nixlib-67baa48161b697b4e09eef1c3cb43b7ba6f68298.tar.lz nixlib-67baa48161b697b4e09eef1c3cb43b7ba6f68298.tar.xz nixlib-67baa48161b697b4e09eef1c3cb43b7ba6f68298.tar.zst nixlib-67baa48161b697b4e09eef1c3cb43b7ba6f68298.zip |
Merge pull request #18930 from acowley/mlton-darwin-bootstrap
mlton: darwin bootstrap fixes
-rw-r--r-- | pkgs/development/compilers/mlton/default.nix | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/pkgs/development/compilers/mlton/default.nix b/pkgs/development/compilers/mlton/default.nix index 9c5ce109b86b..583f6f80137f 100644 --- a/pkgs/development/compilers/mlton/default.nix +++ b/pkgs/development/compilers/mlton/default.nix @@ -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; |