diff options
Diffstat (limited to 'pkgs/development/compilers/mlton')
-rw-r--r-- | pkgs/development/compilers/mlton/20130715.nix | 10 | ||||
-rw-r--r-- | pkgs/development/compilers/mlton/20180207-binary.nix | 6 | ||||
-rw-r--r-- | pkgs/development/compilers/mlton/20210117-binary.nix | 6 |
3 files changed, 11 insertions, 11 deletions
diff --git a/pkgs/development/compilers/mlton/20130715.nix b/pkgs/development/compilers/mlton/20130715.nix index 98b4aeda5516..90285bf08982 100644 --- a/pkgs/development/compilers/mlton/20130715.nix +++ b/pkgs/development/compilers/mlton/20130715.nix @@ -3,7 +3,7 @@ let version = "20130715"; - usr_prefix = if stdenv.isDarwin then "usr/local" else "usr"; + usr_prefix = if stdenv.hostPlatform.isDarwin then "usr/local" else "usr"; dynamic_linker = stdenv.cc.bintools.dynamicLinker; in @@ -38,7 +38,7 @@ stdenv.mkDerivation rec { sourceRoot = "${pname}-${version}"; buildInputs = [ gmp ]; - nativeBuildInputs = lib.optional stdenv.isLinux patchelf; + nativeBuildInputs = lib.optional stdenv.hostPlatform.isLinux patchelf; makeFlags = [ "all-no-docs" ]; @@ -63,7 +63,7 @@ stdenv.mkDerivation rec { substituteInPlace $(pwd)/../${usr_prefix}/bin/mlton --replace '/${usr_prefix}/lib/mlton' $(pwd)/../${usr_prefix}/lib/mlton '' + 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 - '' + lib.optionalString stdenv.isDarwin '' + '' + lib.optionalString stdenv.hostPlatform.isDarwin '' sed -i 's|XCFLAGS += -I/usr/local/include -I/sw/include -I/opt/local/include||' ./runtime/Makefile ''; @@ -79,13 +79,13 @@ stdenv.mkDerivation rec { # So the builder runs the binary compiler with gmp. export LD_LIBRARY_PATH=${gmp.out}/lib''${LD_LIBRARY_PATH:+:}$LD_LIBRARY_PATH - '' + lib.optionalString stdenv.isLinux '' + '' + lib.optionalString stdenv.hostPlatform.isLinux '' # Patch ELF interpreter. patchelf --set-interpreter ${dynamic_linker} $(pwd)/../${usr_prefix}/lib/mlton/mlton-compile for e in mllex mlyacc ; do patchelf --set-interpreter ${dynamic_linker} $(pwd)/../${usr_prefix}/bin/$e done - '' + lib.optionalString stdenv.isDarwin '' + '' + lib.optionalString stdenv.hostPlatform.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 diff --git a/pkgs/development/compilers/mlton/20180207-binary.nix b/pkgs/development/compilers/mlton/20180207-binary.nix index 4846b58bf26b..2384122d70b6 100644 --- a/pkgs/development/compilers/mlton/20180207-binary.nix +++ b/pkgs/development/compilers/mlton/20180207-binary.nix @@ -18,7 +18,7 @@ stdenv.mkDerivation rec { throw "Architecture not supported"; buildInputs = [ gmp ]; - nativeBuildInputs = lib.optional stdenv.isLinux patchelf; + nativeBuildInputs = lib.optional stdenv.hostPlatform.isLinux patchelf; buildPhase = '' make update \ @@ -31,7 +31,7 @@ stdenv.mkDerivation rec { make install PREFIX=$out ''; - postFixup = lib.optionalString stdenv.isLinux '' + postFixup = lib.optionalString stdenv.hostPlatform.isLinux '' patchelf --set-interpreter ${dynamic-linker} $out/lib/mlton/mlton-compile patchelf --set-rpath ${gmp}/lib $out/lib/mlton/mlton-compile @@ -39,7 +39,7 @@ stdenv.mkDerivation rec { patchelf --set-interpreter ${dynamic-linker} $out/bin/$e patchelf --set-rpath ${gmp}/lib $out/bin/$e done - '' + lib.optionalString stdenv.isDarwin '' + '' + lib.optionalString stdenv.hostPlatform.isDarwin '' install_name_tool -change \ /opt/local/lib/libgmp.10.dylib \ ${gmp}/lib/libgmp.10.dylib \ diff --git a/pkgs/development/compilers/mlton/20210117-binary.nix b/pkgs/development/compilers/mlton/20210117-binary.nix index d4e55d47b94c..40e9482ba1fb 100644 --- a/pkgs/development/compilers/mlton/20210117-binary.nix +++ b/pkgs/development/compilers/mlton/20210117-binary.nix @@ -21,7 +21,7 @@ stdenv.mkDerivation rec { throw "Architecture not supported"; buildInputs = [ gmp ]; - nativeBuildInputs = lib.optional stdenv.isLinux patchelf; + nativeBuildInputs = lib.optional stdenv.hostPlatform.isLinux patchelf; buildPhase = '' make update \ @@ -34,7 +34,7 @@ stdenv.mkDerivation rec { make install PREFIX=$out ''; - postFixup = lib.optionalString stdenv.isLinux '' + postFixup = lib.optionalString stdenv.hostPlatform.isLinux '' patchelf --set-interpreter ${dynamic-linker} $out/lib/mlton/mlton-compile patchelf --set-rpath ${gmp}/lib $out/lib/mlton/mlton-compile @@ -42,7 +42,7 @@ stdenv.mkDerivation rec { patchelf --set-interpreter ${dynamic-linker} $out/bin/$e patchelf --set-rpath ${gmp}/lib $out/bin/$e done - '' + lib.optionalString stdenv.isDarwin '' + '' + lib.optionalString stdenv.hostPlatform.isDarwin '' install_name_tool -change \ /opt/local/lib/libgmp.10.dylib \ ${gmp}/lib/libgmp.10.dylib \ |